pub struct InMemorySegmentStore { /* private fields */ }Expand description
インメモリにカラムナーセグメントを保持する。
Implementations§
Source§impl InMemorySegmentStore
impl InMemorySegmentStore
Sourcepub fn write_segment(
&self,
table_id: u32,
segment: ColumnSegmentV2,
) -> Result<u64>
pub fn write_segment( &self, table_id: u32, segment: ColumnSegmentV2, ) -> Result<u64>
セグメントを書き込み、割り当てたセグメントIDを返す。
Sourcepub fn read_segment(
&self,
table_id: u32,
segment_id: u64,
columns: &[usize],
) -> Result<Vec<RecordBatch>>
pub fn read_segment( &self, table_id: u32, segment_id: u64, columns: &[usize], ) -> Result<Vec<RecordBatch>>
セグメントを読み取り、指定カラムを返す。
Sourcepub fn memory_usage(&self) -> u64
pub fn memory_usage(&self) -> u64
現在のメモリ使用量(バイト)を返す。
Sourcepub fn flush_to_segment_file<P: AsRef<Path>>(
&self,
table_id: u32,
segment_id: u64,
path: P,
) -> Result<()>
pub fn flush_to_segment_file<P: AsRef<Path>>( &self, table_id: u32, segment_id: u64, path: P, ) -> Result<()>
セグメントをファイルへフラッシュする(fsync + rename)。
Sourcepub fn flush_to_kvs(
&self,
table_id: u32,
segment_id: u64,
bridge: &ColumnarKvsBridge,
) -> Result<u64>
pub fn flush_to_kvs( &self, table_id: u32, segment_id: u64, bridge: &ColumnarKvsBridge, ) -> Result<u64>
KVS へフラッシュする(ColumnarKvsBridge 経由)。
Sourcepub fn flush_to_alopex(
&self,
table_id: u32,
segment_id: u64,
writer: &mut AlopexFileWriter,
) -> Result<u32>
pub fn flush_to_alopex( &self, table_id: u32, segment_id: u64, writer: &mut AlopexFileWriter, ) -> Result<u32>
.alopex ファイルへフラッシュする。
Sourcepub fn column_count(&self, table_id: u32, segment_id: u64) -> Result<usize>
pub fn column_count(&self, table_id: u32, segment_id: u64) -> Result<usize>
カラム数を返す(メタデータから取得)。
Sourcepub fn list_segments(&self) -> Vec<(u32, u64)>
pub fn list_segments(&self) -> Vec<(u32, u64)>
すべてのセグメント (table_id, segment_id) を返す。
Auto Trait Implementations§
impl !Freeze for InMemorySegmentStore
impl RefUnwindSafe for InMemorySegmentStore
impl Send for InMemorySegmentStore
impl Sync for InMemorySegmentStore
impl Unpin for InMemorySegmentStore
impl UnsafeUnpin for InMemorySegmentStore
impl UnwindSafe for InMemorySegmentStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more