risingwave_storage::hummock::sstable::writer

Trait SstableWriter

source
pub trait SstableWriter: Send {
    type Output;

    // Required methods
    fn write_block<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        block: &'life1 [u8],
        meta: &'life2 BlockMeta,
    ) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn write_block_bytes<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        block: Bytes,
        meta: &'life1 BlockMeta,
    ) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn finish<'async_trait>(
        self,
        meta: SstableMeta,
    ) -> Pin<Box<dyn Future<Output = HummockResult<Self::Output>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn data_len(&self) -> usize;
}
Expand description

A consumer of SST data.

Required Associated Types§

Required Methods§

source

fn write_block<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, block: &'life1 [u8], meta: &'life2 BlockMeta, ) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Write an SST block to the writer.

source

fn write_block_bytes<'life0, 'life1, 'async_trait>( &'life0 mut self, block: Bytes, meta: &'life1 BlockMeta, ) -> Pin<Box<dyn Future<Output = HummockResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn finish<'async_trait>( self, meta: SstableMeta, ) -> Pin<Box<dyn Future<Output = HummockResult<Self::Output>> + Send + 'async_trait>>
where Self: 'async_trait,

Finish writing the SST.

source

fn data_len(&self) -> usize

Get the length of data that has already been written.

Implementors§