pub struct SstableInfo {Show 14 fields
pub object_id: u64,
pub sst_id: u64,
pub key_range: Option<KeyRange>,
pub file_size: u64,
pub table_ids: Vec<u32>,
pub meta_offset: u64,
pub stale_key_count: u64,
pub total_key_count: u64,
pub min_epoch: u64,
pub max_epoch: u64,
pub uncompressed_file_size: u64,
pub range_tombstone_count: u64,
pub bloom_filter_kind: i32,
pub sst_size: u64,
}
Fields§
§object_id: u64
§sst_id: u64
§key_range: Option<KeyRange>
§file_size: u64
represents the physical object size, which is usually used in the builder.
table_ids: Vec<u32>
§meta_offset: u64
§stale_key_count: u64
§total_key_count: u64
§min_epoch: u64
§max_epoch: u64
§uncompressed_file_size: u64
§range_tombstone_count: u64
§bloom_filter_kind: i32
§sst_size: u64
In order to calculate more finely in the compaction strategy, we need to re-calculate the sst_size after split sst
sst_size
represents the size of the sst instead of the object size(usually used in the meta).
Implementations§
source§impl SstableInfo
impl SstableInfo
sourcepub fn bloom_filter_kind(&self) -> BloomFilterType
pub fn bloom_filter_kind(&self) -> BloomFilterType
Returns the enum value of bloom_filter_kind
, or the default if the field is set to an invalid enum value.
sourcepub fn set_bloom_filter_kind(&mut self, value: BloomFilterType)
pub fn set_bloom_filter_kind(&mut self, value: BloomFilterType)
Sets bloom_filter_kind
to the provided enum value.
source§impl SstableInfo
impl SstableInfo
pub fn get_object_id(&self) -> u64
pub fn get_sst_id(&self) -> u64
pub fn get_key_range(&self) -> Result<&KeyRange, PbFieldNotFound>
pub fn get_file_size(&self) -> u64
pub fn get_table_ids(&self) -> &Vec<u32>
pub fn get_meta_offset(&self) -> u64
pub fn get_stale_key_count(&self) -> u64
pub fn get_total_key_count(&self) -> u64
pub fn get_min_epoch(&self) -> u64
pub fn get_max_epoch(&self) -> u64
pub fn get_uncompressed_file_size(&self) -> u64
pub fn get_range_tombstone_count(&self) -> u64
pub fn get_bloom_filter_kind(&self) -> Result<BloomFilterType, PbFieldNotFound>
pub fn get_sst_size(&self) -> u64
Trait Implementations§
source§impl Clone for SstableInfo
impl Clone for SstableInfo
source§fn clone(&self) -> SstableInfo
fn clone(&self) -> SstableInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SstableInfo
impl Debug for SstableInfo
source§impl Default for SstableInfo
impl Default for SstableInfo
source§impl<'de> Deserialize<'de> for SstableInfo
impl<'de> Deserialize<'de> for SstableInfo
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Message for SstableInfo
impl Message for SstableInfo
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for SstableInfo
impl PartialEq for SstableInfo
source§impl Serialize for SstableInfo
impl Serialize for SstableInfo
impl Eq for SstableInfo
impl StructuralPartialEq for SstableInfo
Auto Trait Implementations§
impl Freeze for SstableInfo
impl RefUnwindSafe for SstableInfo
impl Send for SstableInfo
impl Sync for SstableInfo
impl Unpin for SstableInfo
impl UnwindSafe for SstableInfo
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request