Class WindowAggProcessorBase<W,C extends WindowProcessor.Context<W>>
java.lang.Object
org.apache.flink.table.runtime.operators.aggregate.window.processors.WindowAggProcessorBase<W,C>
- All Implemented Interfaces:
Serializable,WindowProcessor<W,C>
- Direct Known Subclasses:
AbstractAsyncStateWindowAggProcessor,AbstractSyncStateWindowAggProcessor
public abstract class WindowAggProcessorBase<W,C extends WindowProcessor.Context<W>>
extends Object
implements WindowProcessor<W,C>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
WindowProcessor.Context<W> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData>protected NamespaceAggsHandleFunction<W>protected ClockServiceprotected Cprotected longprotected final GeneratedNamespaceAggsHandleFunction<W>protected final booleanprotected org.apache.flink.table.data.utils.JoinedRowDataprotected final ZoneIdprotected final booleanThe shift timezone is using DayLightSaving time or not.protected WindowTimerService<W> -
Constructor Summary
ConstructorsConstructorDescriptionWindowAggProcessorBase(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer, boolean isEventTime, ZoneId shiftTimeZone) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()The tear-down method of the function.protected voidcollect(org.apache.flink.table.data.RowData currentKey, org.apache.flink.table.data.RowData aggResult) Send result to downstream.protected abstract WindowTimerService<W>voidinitializeWatermark(long watermark) Initializes the watermark which restores from state.voidInitialization method for the function.protected abstract voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
createWindowSerializer
-
Field Details
-
genAggsHandler
-
accSerializer
protected final org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer -
isEventTime
protected final boolean isEventTime -
shiftTimeZone
-
useDayLightSaving
protected final boolean useDayLightSavingThe shift timezone is using DayLightSaving time or not. -
currentProgress
protected transient long currentProgress -
ctx
-
clockService
-
windowTimerService
-
aggregator
-
reuseOutput
protected transient org.apache.flink.table.data.utils.JoinedRowData reuseOutput
-
-
Constructor Details
-
WindowAggProcessorBase
public WindowAggProcessorBase(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer, boolean isEventTime, ZoneId shiftTimeZone)
-
-
Method Details
-
open
Description copied from interface:WindowProcessorInitialization method for the function. It is called before the actual working methods.- Specified by:
openin interfaceWindowProcessor<W,C extends WindowProcessor.Context<W>> - Throws:
Exception
-
initializeWatermark
public void initializeWatermark(long watermark) Description copied from interface:WindowProcessorInitializes the watermark which restores from state. The method is called after open method and before the actual working methods.- Specified by:
initializeWatermarkin interfaceWindowProcessor<W,C extends WindowProcessor.Context<W>> - Parameters:
watermark- the initial watermark
-
close
Description copied from interface:WindowProcessorThe tear-down method of the function. It is called after the last call to the main working methods.- Specified by:
closein interfaceWindowProcessor<W,C extends WindowProcessor.Context<W>> - Throws:
Exception
-
prepareAggregator
- Throws:
Exception
-
getWindowTimerService
-
collect
protected void collect(org.apache.flink.table.data.RowData currentKey, org.apache.flink.table.data.RowData aggResult) Send result to downstream.The
RowKindof the results is alwaysRowKind.INSERT.TODO support early fire / late file to produce changelog result.
-