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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.runtime.operators.window.tvf.common.WindowProcessor
WindowProcessor.Context<W>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData>accSerializerprotected NamespaceAggsHandleFunction<W>aggregatorprotected ClockServiceclockServiceprotected Cctxprotected longcurrentProgressprotected GeneratedNamespaceAggsHandleFunction<W>genAggsHandlerprotected booleanisEventTimeprotected org.apache.flink.table.data.utils.JoinedRowDatareuseOutputprotected ZoneIdshiftTimeZoneprotected booleanuseDayLightSavingThe shift timezone is using DayLightSaving time or not.protected WindowTimerService<W>windowTimerService
-
Constructor Summary
Constructors Constructor Description WindowAggProcessorBase(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer, boolean isEventTime, ZoneId shiftTimeZone)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()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>getWindowTimerService()voidinitializeWatermark(long watermark)Initializes the watermark which restores from state.voidopen(C context)Initialization method for the function.protected abstract voidprepareAggregator()-
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
createWindowSerializer
-
-
-
-
Field Detail
-
genAggsHandler
protected final GeneratedNamespaceAggsHandleFunction<W> genAggsHandler
-
accSerializer
protected final org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer
-
isEventTime
protected final boolean isEventTime
-
shiftTimeZone
protected final ZoneId shiftTimeZone
-
useDayLightSaving
protected final boolean useDayLightSaving
The shift timezone is using DayLightSaving time or not.
-
currentProgress
protected transient long currentProgress
-
ctx
protected transient C extends WindowProcessor.Context<W> ctx
-
clockService
protected transient ClockService clockService
-
windowTimerService
protected transient WindowTimerService<W> windowTimerService
-
aggregator
protected transient NamespaceAggsHandleFunction<W> aggregator
-
reuseOutput
protected transient org.apache.flink.table.data.utils.JoinedRowData reuseOutput
-
-
Constructor Detail
-
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 Detail
-
open
public void open(C context) throws Exception
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
public void close() throws ExceptionDescription 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
-
getWindowTimerService
protected abstract WindowTimerService<W> 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.
-
-