W - type of windowpublic abstract class InternalWindowProcessFunction<K,W extends Window> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
InternalWindowProcessFunction.Context<K,W extends Window>
Information available in an invocation of methods of
InternalWindowProcessFunction. |
| Modifier and Type | Field and Description |
|---|---|
protected long |
allowedLateness |
protected InternalWindowProcessFunction.Context<K,W> |
ctx |
protected NamespaceAggsHandleFunctionBase<W> |
windowAggregator |
protected GroupWindowAssigner<W> |
windowAssigner |
| Modifier | Constructor and Description |
|---|---|
protected |
InternalWindowProcessFunction(GroupWindowAssigner<W> windowAssigner,
NamespaceAggsHandleFunctionBase<W> windowAggregator,
long allowedLateness) |
| Modifier and Type | Method and Description |
|---|---|
abstract Collection<W> |
assignActualWindows(org.apache.flink.table.data.RowData inputRow,
long timestamp)
Assigns the input element into the actual windows which the
Trigger should trigger
on. |
abstract Collection<W> |
assignStateNamespace(org.apache.flink.table.data.RowData inputRow,
long timestamp)
Assigns the input element into the state namespace which the input element should be
accumulated/retracted into.
|
abstract void |
cleanWindowIfNeeded(W window,
long currentTime)
Cleans the given window if needed.
|
void |
close()
The tear-down method of the function.
|
protected boolean |
isCleanupTime(W window,
long time)
Returns
true if the given time is the cleanup time for the given window. |
protected boolean |
isWindowLate(W window)
Returns
true if the watermark is after the end timestamp plus the allowed lateness of
the given window. |
void |
open(InternalWindowProcessFunction.Context<K,W> ctx)
Initialization method for the function.
|
abstract void |
prepareAggregateAccumulatorForEmit(W window)
Prepares the accumulator of the given window before emit the final result.
|
protected final GroupWindowAssigner<W extends Window> windowAssigner
protected final NamespaceAggsHandleFunctionBase<W extends Window> windowAggregator
protected final long allowedLateness
protected InternalWindowProcessFunction.Context<K,W extends Window> ctx
protected InternalWindowProcessFunction(GroupWindowAssigner<W> windowAssigner, NamespaceAggsHandleFunctionBase<W> windowAggregator, long allowedLateness)
public void open(InternalWindowProcessFunction.Context<K,W> ctx) throws Exception
Exceptionpublic abstract Collection<W> assignStateNamespace(org.apache.flink.table.data.RowData inputRow, long timestamp) throws Exception
inputRow - the input elementtimestamp - the timestamp of the element or the processing time (depends on the type of
assigner)Exceptionpublic abstract Collection<W> assignActualWindows(org.apache.flink.table.data.RowData inputRow, long timestamp) throws Exception
Trigger should trigger
on.inputRow - the input elementtimestamp - the timestamp of the element or the processing time (depends on the type of
assigner)Exceptionpublic abstract void prepareAggregateAccumulatorForEmit(W window) throws Exception
window - the windowExceptionpublic abstract void cleanWindowIfNeeded(W window, long currentTime) throws Exception
window - the window to cleanupcurrentTime - the current timestampExceptionpublic void close()
throws Exception
Exceptionprotected final boolean isCleanupTime(W window, long time)
true if the given time is the cleanup time for the given window.protected boolean isWindowLate(W window)
true if the watermark is after the end timestamp plus the allowed lateness of
the given window.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.