Trait raftstore::coprocessor::SplitChecker [−][src]
SplitChecker is invoked during a split check scan, and decides to use which keys to split a region.
Required methods
fn split_keys(&mut self) -> Vec<Vec<u8>>
[src]
Get the desired split keys.
fn policy(&self) -> CheckPolicy
[src]
Get split policy.
Provided methods
fn on_kv(&mut self, _: &mut ObserverContext<'_>, _: &KeyEntry) -> bool
[src]
Hook to call for every kv scanned during split.
Return true to abort scan early.
fn approximate_split_keys(&mut self, _: &Region, _: &E) -> Result<Vec<Vec<u8>>>
[src]
Get approximate split keys without scan.
Implementors
impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::half::Checker where
E: KvEngine,
[src]
E: KvEngine,
fn on_kv(&mut self, _: &mut ObserverContext<'_>, entry: &KeyEntry) -> bool
[src]
fn split_keys(&mut self) -> Vec<Vec<u8>>
[src]
fn approximate_split_keys(
&mut self,
region: &Region,
engine: &E
) -> Result<Vec<Vec<u8>>>
[src]
&mut self,
region: &Region,
engine: &E
) -> Result<Vec<Vec<u8>>>
fn policy(&self) -> CheckPolicy
[src]
impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::keys::Checker where
E: KvEngine,
[src]
E: KvEngine,
fn on_kv(&mut self, _: &mut ObserverContext<'_>, key: &KeyEntry) -> bool
[src]
fn split_keys(&mut self) -> Vec<Vec<u8>>
[src]
fn policy(&self) -> CheckPolicy
[src]
impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::size::Checker where
E: KvEngine,
[src]
E: KvEngine,
fn on_kv(&mut self, _: &mut ObserverContext<'_>, entry: &KeyEntry) -> bool
[src]
fn split_keys(&mut self) -> Vec<Vec<u8>>
[src]
fn policy(&self) -> CheckPolicy
[src]
fn approximate_split_keys(
&mut self,
region: &Region,
engine: &E
) -> Result<Vec<Vec<u8>>>
[src]
&mut self,
region: &Region,
engine: &E
) -> Result<Vec<Vec<u8>>>
impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::table::Checker where
E: KvEngine,
[src]
E: KvEngine,
fn on_kv(&mut self, _: &mut ObserverContext<'_>, entry: &KeyEntry) -> bool
[src]
Feed keys in order to find the split key.
If current_data_key
does not belong to status.first_encoded_table_prefix
.
it returns the encoded table prefix of current_data_key
.