pub trait TopNExecutorBase: Send + 'static {
// Required methods
fn apply_chunk(
&mut self,
chunk: StreamChunk,
) -> impl Future<Output = StreamExecutorResult<Option<StreamChunk>>> + Send;
fn flush_data(
&mut self,
epoch: EpochPair,
) -> impl Future<Output = StreamExecutorResult<()>> + Send;
fn try_flush_data(
&mut self,
) -> impl Future<Output = StreamExecutorResult<()>> + Send;
fn init(
&mut self,
epoch: EpochPair,
) -> impl Future<Output = StreamExecutorResult<()>> + Send;
fn handle_watermark(
&mut self,
watermark: Watermark,
) -> impl Future<Output = Option<Watermark>> + Send;
// Provided methods
fn update_vnode_bitmap(&mut self, _vnode_bitmap: Arc<Bitmap>) { ... }
fn evict(&mut self) { ... }
}
Required Methods§
sourcefn apply_chunk(
&mut self,
chunk: StreamChunk,
) -> impl Future<Output = StreamExecutorResult<Option<StreamChunk>>> + Send
fn apply_chunk( &mut self, chunk: StreamChunk, ) -> impl Future<Output = StreamExecutorResult<Option<StreamChunk>>> + Send
Apply the chunk to the dirty state and get the diffs.
TODO(rc): There can be a 2 times amplification in terms of the chunk size, so we may need to
allow apply_chunk
return a stream of chunks. Motivation is not quite strong though.
sourcefn flush_data(
&mut self,
epoch: EpochPair,
) -> impl Future<Output = StreamExecutorResult<()>> + Send
fn flush_data( &mut self, epoch: EpochPair, ) -> impl Future<Output = StreamExecutorResult<()>> + Send
Flush the buffered chunk to the storage backend.
sourcefn try_flush_data(
&mut self,
) -> impl Future<Output = StreamExecutorResult<()>> + Send
fn try_flush_data( &mut self, ) -> impl Future<Output = StreamExecutorResult<()>> + Send
Flush the buffered chunk to the storage backend.
fn init( &mut self, epoch: EpochPair, ) -> impl Future<Output = StreamExecutorResult<()>> + Send
Provided Methods§
sourcefn update_vnode_bitmap(&mut self, _vnode_bitmap: Arc<Bitmap>)
fn update_vnode_bitmap(&mut self, _vnode_bitmap: Arc<Bitmap>)
Update the vnode bitmap for the state table and manipulate the cache if necessary, only used by Group Top-N since it’s distributed.
fn evict(&mut self)
Object Safety§
This trait is not object safe.