pub trait SinkCommitCoordinator {
// Required methods
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn commit<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
metadata: Vec<SinkMetadata>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
sourcefn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the sink committer coordinator
sourcefn commit<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
metadata: Vec<SinkMetadata>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 mut self,
epoch: u64,
metadata: Vec<SinkMetadata>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
After collecting the metadata from each sink writer, a coordinator will call commit
with
the set of metadata. The metadata is serialized into bytes, because the metadata is expected
to be passed between different gRPC node, so in this general trait, the metadata is
serialized bytes.