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§
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§
sourcefn 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_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.
sourcefn 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,
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.