public final class SliceSharedWindowAggProcessor extends AbstractWindowAggProcessor implements SliceSharedAssigner.MergeCallback
SliceSharedAssigner, e.g.
hopping windows and cumulative windows.SlicingWindowProcessor.Context<W>accSerializer, aggregator, clockService, ctx, currentProgress, genAggsHandler, isEventTime, reuseOutput, shiftTimeZone, sliceAssigner, useDayLightSaving, windowBuffer, windowBufferFactory, windowInterval, windowState, windowTimerService| Constructor and Description |
|---|
SliceSharedWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<Long> genAggsHandler,
WindowBuffer.Factory bufferFactory,
SliceSharedAssigner sliceAssigner,
org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer,
int indexOfCountStar,
java.time.ZoneId shiftTimeZone) |
| Modifier and Type | Method and Description |
|---|---|
void |
fireWindow(Long windowEnd)
Emit results of the given window.
|
void |
merge(Long mergeResult,
Iterable<Long> toBeMerged)
Specifies that states of the given slices should be merged into the result slice.
|
protected long |
sliceStateMergeTarget(long sliceToMerge)
Returns the slice state target to merge the given slice into when firing windows.
|
advanceProgress, clearWindow, close, collect, createWindowSerializer, open, prepareCheckpoint, processElementpublic SliceSharedWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<Long> genAggsHandler, WindowBuffer.Factory bufferFactory, SliceSharedAssigner sliceAssigner, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer, int indexOfCountStar, java.time.ZoneId shiftTimeZone)
public void fireWindow(Long windowEnd) throws Exception
SlicingWindowProcessorNote: the key context has been set.
fireWindow in interface SlicingWindowProcessor<Long>windowEnd - the window to emitExceptionpublic void merge(@Nullable Long mergeResult, Iterable<Long> toBeMerged) throws Exception
SliceSharedAssigner.MergeCallbackmerge in interface SliceSharedAssigner.MergeCallbackmergeResult - The resulting merged slice, null if it represents a non-state
namespace.toBeMerged - The list of slices that should be merged into one slice.Exceptionprotected long sliceStateMergeTarget(long sliceToMerge)
throws Exception
AbstractWindowAggProcessorsliceToMerge. For shared windows, the merge target should be the shared slice
state.sliceStateMergeTarget in class AbstractWindowAggProcessorExceptionSliceSharedAssigner.mergeSlices(long, SliceSharedAssigner.MergeCallback)Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.