[][src]Struct rocks::table::PlainTableOptions

pub struct PlainTableOptions { /* fields omitted */ }

Implementations

impl PlainTableOptions[src]

pub fn user_key_len(self, val: u32) -> Self[src]

@user_key_len: plain table has optimization for fix-sized keys, which can be specified via user_key_len. Alternatively, you can pass kPlainTableVariableLength if your keys have variable lengths.

pub fn bloom_bits_per_key(self, val: i32) -> Self[src]

@bloom_bits_per_key: the number of bits used for bloom filer per prefix. You may disable it by passing a zero.

pub fn hash_table_ratio(self, val: f64) -> Self[src]

@hash_table_ratio: the desired utilization of the hash table used for prefix hashing. hash_table_ratio = number of prefixes / #buckets in the hash table

pub fn index_sparseness(self, val: usize) -> Self[src]

@index_sparseness: inside each prefix, need to build one index record for how many keys for binary search inside each hash bucket. For encoding type kPrefix, the value will be used when writing to determine an interval to rewrite the full key. It will also be used as a suggestion and satisfied when possible.

pub fn huge_page_tlb_size(self, val: usize) -> Self[src]

@huge_page_tlb_size: if <=0, allocate hash indexes and blooms from malloc. Otherwise from huge page TLB. The user needs to reserve huge pages for it to be allocated, like: sysctl -w vm.nr_hugepages=20 See linux doc Documentation/vm/hugetlbpage.txt

pub fn encoding_type(self, val: EncodingType) -> Self[src]

@encoding_type: how to encode the keys. See enum EncodingType above for the choices. The value will determine how to encode keys when writing to a new SST file. This value will be stored inside the SST file which will be used when reading from the file, which makes it possible for users to choose different encoding type when reopening a DB. Files with different encoding types can co-exist in the same DB and can be read.

pub fn full_scan_mode(self, val: bool) -> Self[src]

@full_scan_mode: mode for reading the whole file one record by one without using the index.

pub fn store_index_in_file(self, val: bool) -> Self[src]

@store_index_in_file: compute plain table index and bloom filter during file building and store it in file. When reading file, index will be mmaped instead of recomputation.

Trait Implementations

impl Default for PlainTableOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.