risingwave_connector::source::base

Trait SplitReader

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

    // Required methods
    fn new<'async_trait>(
        properties: Self::Properties,
        state: Vec<Self::Split>,
        parser_config: ParserConfig,
        source_ctx: SourceContextRef,
        columns: Option<Vec<Column>>,
    ) -> Pin<Box<dyn Future<Output = ConnectorResult<Self>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn into_stream(self) -> BoxChunkSourceStream;

    // Provided methods
    fn backfill_info(&self) -> HashMap<SplitId, BackfillInfo> { ... }
    fn seek_to_latest<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SplitImpl>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

SplitReader is a new abstraction of the external connector read interface which is responsible for parsing, it is used to read messages from the outside and transform them into a stream of parsed StreamChunk

Required Associated Types§

Required Methods§

source

fn new<'async_trait>( properties: Self::Properties, state: Vec<Self::Split>, parser_config: ParserConfig, source_ctx: SourceContextRef, columns: Option<Vec<Column>>, ) -> Pin<Box<dyn Future<Output = ConnectorResult<Self>> + Send + 'async_trait>>
where Self: 'async_trait,

source

fn into_stream(self) -> BoxChunkSourceStream

Provided Methods§

source

fn backfill_info(&self) -> HashMap<SplitId, BackfillInfo>

source

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl SplitReader for PulsarSplitReader

source§

impl SplitReader for DatagenSplitReader

source§

impl SplitReader for S3FileReader

source§

impl SplitReader for PubsubSplitReader

source§

impl SplitReader for IcebergFileReader

source§

impl SplitReader for KafkaSplitReader

source§

impl SplitReader for KinesisSplitReader

source§

impl SplitReader for MqttSplitReader

source§

impl SplitReader for NatsSplitReader

source§

impl SplitReader for NexmarkSplitReader

source§

impl SplitReader for PulsarBrokerReader

source§

impl SplitReader for TestSourceSplitReader

source§

impl<Src: OpendalSource> SplitReader for OpendalReader<Src>

source§

impl<T: CdcSourceTypeTrait> SplitReader for CdcSplitReader<T>