public class UnsliceWindowAggProcessor extends AbstractWindowAggProcessor<TimeWindow> implements UnslicingWindowProcessor<TimeWindow>
UnsliceAssigner, e.g.
session windows.AbstractWindowAggProcessor.WindowIsEmptySupplierWindowProcessor.Context<W>| Modifier and Type | Field and Description |
|---|---|
protected MergingWindowProcessFunction<org.apache.flink.table.data.RowData,TimeWindow> |
windowFunction |
accSerializer, aggregator, clockService, ctx, currentProgress, emptySupplier, genAggsHandler, isEventTime, reuseOutput, shiftTimeZone, useDayLightSaving, windowState, windowTimerService| Constructor and Description |
|---|
UnsliceWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<TimeWindow> genAggsHandler,
UnsliceAssigner<TimeWindow> unsliceAssigner,
org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer,
int indexOfCountStar,
ZoneId shiftTimeZone) |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceProgress(long progress)
Advances the progress time, the progress time is watermark if working in event-time mode, or
current processing time if working in processing-time mode.
|
void |
clearWindow(long timerTimestamp,
TimeWindow window)
Clear state and resources associated with the given window namespace.
|
org.apache.flink.api.common.typeutils.TypeSerializer<TimeWindow> |
createWindowSerializer()
Returns the serializer of the window type.
|
void |
fireWindow(long timerTimestamp,
TimeWindow window)
Emit results of the given window.
|
protected WindowTimerService<TimeWindow> |
getWindowTimerService() |
void |
open(WindowProcessor.Context<TimeWindow> context)
Initialization method for the function.
|
void |
prepareCheckpoint()
Performs a preparation before checkpoint.
|
boolean |
processElement(org.apache.flink.table.data.RowData key,
org.apache.flink.table.data.RowData element)
Process an element with associated key from the input stream.
|
close, collect, initializeWatermarkclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, initializeWatermarkprotected transient MergingWindowProcessFunction<org.apache.flink.table.data.RowData,TimeWindow> windowFunction
public UnsliceWindowAggProcessor(GeneratedNamespaceAggsHandleFunction<TimeWindow> genAggsHandler, UnsliceAssigner<TimeWindow> unsliceAssigner, org.apache.flink.api.common.typeutils.TypeSerializer<org.apache.flink.table.data.RowData> accSerializer, int indexOfCountStar, ZoneId shiftTimeZone)
public void open(WindowProcessor.Context<TimeWindow> context) throws Exception
WindowProcessoropen in interface WindowProcessor<TimeWindow>open in class AbstractWindowAggProcessor<TimeWindow>Exceptionpublic boolean processElement(org.apache.flink.table.data.RowData key,
org.apache.flink.table.data.RowData element)
throws Exception
WindowProcessorprocessElement in interface WindowProcessor<TimeWindow>key - the key associated with the elementelement - The element to process.Exceptionpublic void fireWindow(long timerTimestamp,
TimeWindow window)
throws Exception
WindowProcessorNote: the key context has been set.
fireWindow in interface WindowProcessor<TimeWindow>timerTimestamp - the fired timestampwindow - the window to emitExceptionpublic void clearWindow(long timerTimestamp,
TimeWindow window)
throws Exception
WindowProcessorNote: the key context has been set.
clearWindow in interface WindowProcessor<TimeWindow>timerTimestamp - the fired timestampwindow - the window to clearExceptionpublic void advanceProgress(long progress)
throws Exception
WindowProcessorThis will potentially flush buffered data into states, because the watermark advancement may be in a very small step, but we don't need to flush buffered data for every watermark advancement.
advanceProgress in interface WindowProcessor<TimeWindow>progress - the current progress timeExceptionpublic void prepareCheckpoint()
throws Exception
WindowProcessorprepareCheckpoint in interface WindowProcessor<TimeWindow>Exceptionpublic org.apache.flink.api.common.typeutils.TypeSerializer<TimeWindow> createWindowSerializer()
WindowProcessorcreateWindowSerializer in interface WindowProcessor<TimeWindow>protected WindowTimerService<TimeWindow> getWindowTimerService()
getWindowTimerService in class AbstractWindowAggProcessor<TimeWindow>Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.