Struct sstable::table_builder::TableBuilder
[−]
[src]
pub struct TableBuilder<'a, Dst: Write> { /* fields omitted */ }
A table consists of DATA BLOCKs, META BLOCKs, a METAINDEX BLOCK, an INDEX BLOCK and a FOOTER.
DATA BLOCKs, META BLOCKs, INDEX BLOCK and METAINDEX BLOCK are built using the code in
the block
module.
The FOOTER consists of a BlockHandle wthat points to the metaindex block, another pointing to the index block, padding to fill up to 40 B and at the end the 8B magic number 0xdb4775248b80fb57.
Methods
impl<'a, Dst: Write> TableBuilder<'a, Dst>
[src]
fn new_no_filter(opt: Options, dst: Dst) -> TableBuilder<'a, Dst>
impl<'a, Dst: Write> TableBuilder<'a, Dst>
[src]
TableBuilder is used for building a new SSTable. It groups entries into blocks, calculating checksums and bloom filters.
fn new(
opt: Options,
dst: Dst,
fpol: Arc<Box<FilterPolicy>>
) -> TableBuilder<'a, Dst>
opt: Options,
dst: Dst,
fpol: Arc<Box<FilterPolicy>>
) -> TableBuilder<'a, Dst>
Create a new TableBuilder. Currently the best choice for fpol
is NoFilterPolicy
(mod
filter; or use new_no_filter())
fn entries(&self) -> usize
fn add(&mut self, key: &'a [u8], val: &[u8])
Add a key to the table. The key as to be lexically greater or equal to the last one added.