pub trait TransformPlugin:
SupportsGracefulShutdown
+ Send
+ Sync {
// Required methods
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn output_schema(&self) -> Result<SchemaRef, PluginError>;
fn process_batch<'life0, 'async_trait>(
&'life0 self,
data: RecordBatch,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_checkpoint_marker<'life0, 'async_trait>(
&'life0 self,
epoch: CheckpointEpoch,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_checkpoint_finalizer<'life0, 'async_trait>(
&'life0 self,
epoch: CheckpointEpoch,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn labels(&self) -> Vec<PluginLabel> { ... }
}Expand description
Optional, non-FFI trait for the plugins to implement transform support.
Required Methods§
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn output_schema(&self) -> Result<SchemaRef, PluginError>
Sourcefn process_batch<'life0, 'async_trait>(
&'life0 self,
data: RecordBatch,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_batch<'life0, 'async_trait>(
&'life0 self,
data: RecordBatch,
) -> Pin<Box<dyn Future<Output = Result<RecordBatch, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return an empty batch to indicate missing data if needed.
Sourcefn process_checkpoint_marker<'life0, 'async_trait>(
&'life0 self,
epoch: CheckpointEpoch,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_checkpoint_marker<'life0, 'async_trait>(
&'life0 self,
epoch: CheckpointEpoch,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returning a successful result indicates that the checkpoint marker was processed successfully, and the mark should be propagated downstream.
fn process_checkpoint_finalizer<'life0, 'async_trait>(
&'life0 self,
epoch: CheckpointEpoch,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn labels(&self) -> Vec<PluginLabel>
fn labels(&self) -> Vec<PluginLabel>
See SourcePlugin::labels.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".