Interface AsyncMergeCallback<W,R>
- Type Parameters:
W- The typeWindowfor windows or the typeLongfor slices that this callback used to merge.R- The result type likeCollectionorIterableto specify which slices or windows should be merged.
- All Known Implementing Classes:
AsyncStateSliceSharedWindowAggProcessor
public interface AsyncMergeCallback<W,R>
Callback to be used in when merging slices or windows for specifying which slices or windows
should be merged.
Different with MergeCallback, this callback maybe merge slices or windows to async
state.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>> asyncMerge(W mergeResult, R toBeMerged, W resultNamespace) Specifies that states of the given windows or slices should be merged into the result window or slice.
-
Method Details
-
asyncMerge
org.apache.flink.api.common.state.v2.StateFuture<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.table.data.RowData,org.apache.flink.table.data.RowData>> asyncMerge(@Nullable W mergeResult, R toBeMerged, W resultNamespace) throws Exception Specifies that states of the given windows or slices should be merged into the result window or slice.- Parameters:
mergeResult- The resulting merged window or slice,nullif it represents a non-state namespace.toBeMerged- Windows or slices that should be merged into one window or slice.resultNamespace- The window or slice used as namespace to get the result from the merged accumulator.- Returns:
- f0 is the accumulators after merging, f1 is the result of the aggregation from the merged accumulators with this slice end as namespace
- Throws:
Exception
-