public final class SliceSharedWindowAggProcessor extends AbstractSliceWindowAggProcessor implements MergeCallback<Long,Iterable<Long>>
SliceSharedAssigner, e.g.
hopping windows and cumulative windows.AbstractWindowAggProcessor.WindowIsEmptySupplierWindowProcessor.Context<W>sliceAssigner, windowBuffer, windowBufferFactory, windowIntervalaccSerializer, aggregator, clockService, ctx, currentProgress, emptySupplier, genAggsHandler, isEventTime, reuseOutput, shiftTimeZone, useDayLightSaving, 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,
ZoneId shiftTimeZone) |
| Modifier and Type | Method and Description |
|---|---|
void |
fireWindow(long timerTimestamp,
Long windowEnd)
Emit results of the given window.
|
void |
merge(Long mergeResult,
Iterable<Long> toBeMerged)
Specifies that states of the given windows or slices should be merged into the result window
or slice.
|
protected long |
sliceStateMergeTarget(long sliceToMerge)
Returns the slice state target to merge the given slice into when firing windows.
|
advanceProgress, clearWindow, close, createWindowSerializer, getWindowTimerService, open, prepareCheckpoint, processElementcollect, initializeWatermarkclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeWatermarkpublic 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, ZoneId shiftTimeZone)
public void fireWindow(long timerTimestamp,
Long windowEnd)
throws Exception
WindowProcessorNote: the key context has been set.
fireWindow in interface WindowProcessor<Long>timerTimestamp - the fired timestampwindowEnd - the window to emitExceptionpublic void merge(@Nullable Long mergeResult, Iterable<Long> toBeMerged) throws Exception
MergeCallbackprotected long sliceStateMergeTarget(long sliceToMerge)
throws Exception
AbstractSliceWindowAggProcessorsliceToMerge. For shared windows, the merge target should be the shared slice
state.sliceStateMergeTarget in class AbstractSliceWindowAggProcessorExceptionSliceSharedAssigner.mergeSlices(long, MergeCallback)Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.