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| 构造器和说明 |
|---|
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) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 SlicingWindowProcessor<Long>windowEnd - the window to emitExceptionpublic void merge(@Nullable Long mergeResult, Iterable<Long> toBeMerged) throws Exception
SliceSharedAssigner.MergeCallbackmerge 在接口中 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.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.