public abstract class AbstractWindowAggProcessor<W> extends Object implements WindowProcessor<W>
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractWindowAggProcessor.WindowIsEmptySupplier
A supplier that returns whether the window is empty.
|
WindowProcessor.Context<W>| Modifier and Type | Field and Description |
|---|---|
protected org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> |
accSerializer |
protected NamespaceAggsHandleFunction<W> |
aggregator |
protected ClockService |
clockService |
protected WindowProcessor.Context<W> |
ctx |
protected long |
currentProgress |
protected AbstractWindowAggProcessor.WindowIsEmptySupplier |
emptySupplier |
protected GeneratedNamespaceAggsHandleFunction<W> |
genAggsHandler |
protected boolean |
isEventTime |
protected org.apache.flink.table.data.utils.JoinedRowData |
reuseOutput |
protected java.time.ZoneId |
shiftTimeZone |
protected boolean |
useDayLightSaving
The shift timezone is using DayLightSaving time or not.
|
protected WindowValueState<W> |
windowState
state schema: [key, window, accumulator].
|
protected WindowTimerService<W> |
windowTimerService |
| Constructor and Description |
|---|
AbstractWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler,
WindowAssigner sliceAssigner,
org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer,
boolean isEventTime,
int indexOfCountStar,
java.time.ZoneId shiftTimeZone) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
The tear-down method of the function.
|
protected void |
collect(org.apache.flink.table.data.RowData aggResult)
Send result to downstream.
|
protected abstract WindowTimerService<W> |
getWindowTimerService() |
void |
initializeWatermark(long watermark)
Initializes the watermark which restores from state.
|
void |
open(WindowProcessor.Context<W> context)
Initialization method for the function.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadvanceProgress, clearWindow, createWindowSerializer, fireWindow, prepareCheckpoint, processElementprotected final GeneratedNamespaceAggsHandleFunction<W> genAggsHandler
protected final org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer
protected final boolean isEventTime
protected final java.time.ZoneId shiftTimeZone
protected final boolean useDayLightSaving
protected final AbstractWindowAggProcessor.WindowIsEmptySupplier emptySupplier
protected transient long currentProgress
protected transient WindowProcessor.Context<W> ctx
protected transient ClockService clockService
protected transient WindowTimerService<W> windowTimerService
protected transient NamespaceAggsHandleFunction<W> aggregator
protected transient WindowValueState<W> windowState
protected transient org.apache.flink.table.data.utils.JoinedRowData reuseOutput
public AbstractWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler, WindowAssigner sliceAssigner, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer, boolean isEventTime, int indexOfCountStar, java.time.ZoneId shiftTimeZone)
public void open(WindowProcessor.Context<W> context) throws Exception
WindowProcessoropen in interface WindowProcessor<W>Exceptionprotected abstract WindowTimerService<W> getWindowTimerService()
public void initializeWatermark(long watermark)
WindowProcessorinitializeWatermark in interface WindowProcessor<W>watermark - the initial watermarkpublic void close()
throws Exception
WindowProcessorclose in interface WindowProcessor<W>Exceptionprotected void collect(org.apache.flink.table.data.RowData aggResult)
The RowKind of the results is always RowKind.INSERT.
TODO support early fire / late file to produce changelog result.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.