W - The type of Window that assigner assigns.public class MergingWindowProcessFunction<K,W extends Window> extends InternalWindowProcessFunction<K,W>
InternalWindowProcessFunction for MergingWindowAssigner.| Modifier and Type | Class and Description |
|---|---|
static class |
MergingWindowProcessFunction.DefaultAccMergingConsumer<W extends Window>
A default merging consumer that merges the accumulators in state windows that waiting to be
merged into the target state window.
|
static interface |
MergingWindowProcessFunction.MergingContext<K,W extends Window>
A
Context used for MergingWindowProcessFunction. |
InternalWindowProcessFunction.Context<K,W extends Window>allowedLateness, ctx, windowAggregator| Constructor and Description |
|---|
MergingWindowProcessFunction(MergingWindowAssigner<W> windowAssigner,
NamespaceAggsHandleFunctionBase<W> windowAggregator,
org.apache.flink.api.common.typeutils.TypeSerializer<W> windowSerializer,
long allowedLateness) |
| Modifier and Type | Method and Description |
|---|---|
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. |
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.
|
void |
cleanWindowIfNeeded(W window,
long currentTime)
Cleans the given window if needed.
|
W |
getStateWindow(W window)
Get the state window as the namespace stored acc in the data about this actual window.
|
void |
open(InternalWindowProcessFunction.Context<K,W> ctx)
Initialization method for the function.
|
void |
prepareAggregateAccumulatorForEmit(W window)
Prepares the accumulator of the given window before emit the final result.
|
close, isCleanupTime, isWindowLatepublic MergingWindowProcessFunction(MergingWindowAssigner<W> windowAssigner, NamespaceAggsHandleFunctionBase<W> windowAggregator, org.apache.flink.api.common.typeutils.TypeSerializer<W> windowSerializer, long allowedLateness)
public void open(InternalWindowProcessFunction.Context<K,W> ctx) throws Exception
InternalWindowProcessFunctionpublic Collection<W> assignStateNamespace(org.apache.flink.table.data.RowData inputRow, long timestamp) throws Exception
InternalWindowProcessFunctionassignStateNamespace in class InternalWindowProcessFunction<K,W extends Window>inputRow - the input elementtimestamp - the timestamp of the element or the processing time (depends on the type of
assigner)Exceptionpublic Collection<W> assignActualWindows(org.apache.flink.table.data.RowData inputRow, long timestamp) throws Exception
InternalWindowProcessFunctionTrigger should trigger
on.assignActualWindows in class InternalWindowProcessFunction<K,W extends Window>inputRow - the input elementtimestamp - the timestamp of the element or the processing time (depends on the type of
assigner)Exceptionpublic void prepareAggregateAccumulatorForEmit(W window) throws Exception
InternalWindowProcessFunctionprepareAggregateAccumulatorForEmit in class InternalWindowProcessFunction<K,W extends Window>window - the windowExceptionpublic void cleanWindowIfNeeded(W window, long currentTime) throws Exception
InternalWindowProcessFunctioncleanWindowIfNeeded in class InternalWindowProcessFunction<K,W extends Window>window - the window to cleanupcurrentTime - the current timestampExceptionCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.