Trait raftstore::coprocessor::SplitChecker[][src]

pub trait SplitChecker<E> {
    fn split_keys(&mut self) -> Vec<Vec<u8>>;
fn policy(&self) -> CheckPolicy; fn on_kv(&mut self, _: &mut ObserverContext<'_>, _: &KeyEntry) -> bool { ... }
fn approximate_split_keys(
        &mut self,
        _: &Region,
        _: &E
    ) -> Result<Vec<Vec<u8>>> { ... } }

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.

Loading content...

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.

Loading content...

Implementors

impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::half::Checker where
    E: KvEngine
[src]

impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::keys::Checker where
    E: KvEngine
[src]

impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::size::Checker where
    E: KvEngine
[src]

impl<E> SplitChecker<E> for raftstore::coprocessor::split_check::table::Checker where
    E: KvEngine
[src]

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.

Loading content...