Class SliceSharedWindowAggProcessor
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractWindowAggProcessor<Long>
-
- org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractSliceWindowAggProcessor
-
- org.apache.flink.table.runtime.operators.aggregate.window.processors.SliceSharedWindowAggProcessor
-
- All Implemented Interfaces:
Serializable,MergeCallback<Long,Iterable<Long>>,WindowProcessor<Long>,SlicingWindowProcessor<Long>
public final class SliceSharedWindowAggProcessor extends AbstractSliceWindowAggProcessor implements MergeCallback<Long,Iterable<Long>>
An window aggregate processor implementation which works forSliceSharedAssigner, e.g. hopping windows and cumulative windows.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractWindowAggProcessor
AbstractWindowAggProcessor.WindowIsEmptySupplier
-
Nested classes/interfaces inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
WindowProcessor.Context<W>
-
-
Field Summary
-
Fields inherited from class org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractSliceWindowAggProcessor
sliceAssigner, windowBuffer, windowBufferFactory, windowInterval
-
Fields inherited from class org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractWindowAggProcessor
accSerializer, aggregator, clockService, ctx, currentProgress, emptySupplier, genAggsHandler, isEventTime, reuseOutput, shiftTimeZone, useDayLightSaving, windowState, windowTimerService
-
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfireWindow(long timerTimestamp, Long windowEnd)Emit results of the given window.voidmerge(Long mergeResult, Iterable<Long> toBeMerged)Specifies that states of the given windows or slices should be merged into the result window or slice.protected longsliceStateMergeTarget(long sliceToMerge)Returns the slice state target to merge the given slice into when firing windows.-
Methods inherited from class org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractSliceWindowAggProcessor
advanceProgress, clearWindow, close, createWindowSerializer, getWindowTimerService, open, prepareCheckpoint, processElement
-
Methods inherited from class org.apache.flink.table.runtime.operators.aggregate.window.processors.AbstractWindowAggProcessor
collect, initializeWatermark
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
initializeWatermark
-
-
-
-
Constructor Detail
-
SliceSharedWindowAggProcessor
public 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)
-
-
Method Detail
-
fireWindow
public void fireWindow(long timerTimestamp, Long windowEnd) throws ExceptionDescription copied from interface:WindowProcessorEmit results of the given window.Note: the key context has been set.
- Specified by:
fireWindowin interfaceWindowProcessor<Long>- Parameters:
timerTimestamp- the fired timestampwindowEnd- the window to emit- Throws:
Exception
-
merge
public void merge(@Nullable Long mergeResult, Iterable<Long> toBeMerged) throws Exception
Description copied from interface:MergeCallbackSpecifies that states of the given windows or slices should be merged into the result window or slice.
-
sliceStateMergeTarget
protected long sliceStateMergeTarget(long sliceToMerge) throws ExceptionDescription copied from class:AbstractSliceWindowAggProcessorReturns the slice state target to merge the given slice into when firing windows. For unshared windows, there should no merging happens, so the merge target should be just the givensliceToMerge. For shared windows, the merge target should be the shared slice state.- Specified by:
sliceStateMergeTargetin classAbstractSliceWindowAggProcessor- Throws:
Exception- See Also:
SliceSharedAssigner.mergeSlices(long, MergeCallback)
-
-