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 TypeSerializer<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 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,
TypeSerializer<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(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, wait
advanceProgress, clearWindow, createWindowSerializer, fireWindow, prepareCheckpoint, processElement
protected final GeneratedNamespaceAggsHandleFunction<W> genAggsHandler
protected final TypeSerializer<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 JoinedRowData reuseOutput
public AbstractWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<W> genAggsHandler, WindowAssigner sliceAssigner, TypeSerializer<RowData> accSerializer, boolean isEventTime, int indexOfCountStar, java.time.ZoneId shiftTimeZone)
public void open(WindowProcessor.Context<W> context) throws Exception
WindowProcessor
open
in interface WindowProcessor<W>
Exception
protected abstract WindowTimerService<W> getWindowTimerService()
public void initializeWatermark(long watermark)
WindowProcessor
initializeWatermark
in interface WindowProcessor<W>
watermark
- the initial watermarkpublic void close() throws Exception
WindowProcessor
close
in interface WindowProcessor<W>
Exception
protected void collect(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.