risingwave_connector::source::base

Trait SplitEnumerator

source
pub trait SplitEnumerator: Sized + Send {
    type Split: SplitMetaData + Send;
    type Properties;

    // Required methods
    fn new<'async_trait>(
        properties: Self::Properties,
        context: SourceEnumeratorContextRef,
    ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn list_splits<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Split>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn on_drop_fragments<'life0, 'async_trait>(
        &'life0 mut self,
        _fragment_ids: Vec<u32>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn on_finish_backfill<'life0, 'async_trait>(
        &'life0 mut self,
        _fragment_ids: Vec<u32>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

SplitEnumerator fetches the split metadata from the external source service. NOTE: It runs in the meta server, so probably it should be moved to the meta crate.

Required Associated Types§

Required Methods§

source

fn new<'async_trait>( properties: Self::Properties, context: SourceEnumeratorContextRef, ) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn list_splits<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Split>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn on_drop_fragments<'life0, 'async_trait>( &'life0 mut self, _fragment_ids: Vec<u32>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Do some cleanup work when a fragment is dropped, e.g., drop Kafka consumer group.

source

fn on_finish_backfill<'life0, 'async_trait>( &'life0 mut self, _fragment_ids: Vec<u32>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Do some cleanup work when a backfill fragment is finished, e.g., drop Kafka consumer group.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SplitEnumerator for DatagenSplitEnumerator

source§

impl SplitEnumerator for LegacyS3SplitEnumerator

source§

impl SplitEnumerator for PubsubSplitEnumerator

source§

impl SplitEnumerator for IcebergSplitEnumerator

source§

impl SplitEnumerator for KafkaSplitEnumerator

source§

impl SplitEnumerator for KinesisSplitEnumerator

source§

impl SplitEnumerator for MqttSplitEnumerator

source§

impl SplitEnumerator for NatsSplitEnumerator

source§

impl SplitEnumerator for NexmarkSplitEnumerator

source§

impl SplitEnumerator for PulsarSplitEnumerator

source§

impl SplitEnumerator for TestSourceSplitEnumerator

source§

impl<Src: OpendalSource> SplitEnumerator for OpendalEnumerator<Src>

source§

impl<T: CdcSourceTypeTrait> SplitEnumerator for DebeziumSplitEnumerator<T>
where Self: ListCdcSplits<CdcSourceType = T>,