W
- The type of Window
that assigner assigns.public class GeneralWindowProcessFunction<K,W extends Window> extends InternalWindowProcessFunction<K,W>
InternalWindowProcessFunction
. The WindowAssigner
should be a regular assigner without implement PanedWindowAssigner
or MergingWindowAssigner
.InternalWindowProcessFunction.Context<K,W extends Window>
allowedLateness, ctx, windowAggregator, windowAssigner
Constructor and Description |
---|
GeneralWindowProcessFunction(WindowAssigner<W> windowAssigner,
NamespaceAggsHandleFunction<W> windowAggregator,
long allowedLateness) |
Modifier and Type | Method and Description |
---|---|
Collection<W> |
assignActualWindows(BaseRow inputRow,
long timestamp)
Assigns the input element into the actual windows which the
Trigger should trigger
on. |
Collection<W> |
assignStateNamespace(BaseRow 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 time)
Cleans the given window if needed.
|
BaseRow |
getWindowAggregationResult(W window)
Gets the aggregation result and window properties of the given window.
|
close, isCleanupTime, isWindowLate, open
public GeneralWindowProcessFunction(WindowAssigner<W> windowAssigner, NamespaceAggsHandleFunction<W> windowAggregator, long allowedLateness)
public Collection<W> assignStateNamespace(BaseRow inputRow, long timestamp) throws Exception
InternalWindowProcessFunction
assignStateNamespace
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)Exception
public Collection<W> assignActualWindows(BaseRow inputRow, long timestamp) throws Exception
InternalWindowProcessFunction
Trigger
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)Exception
public BaseRow getWindowAggregationResult(W window) throws Exception
InternalWindowProcessFunction
getWindowAggregationResult
in class InternalWindowProcessFunction<K,W extends Window>
window
- the windowException
public void cleanWindowIfNeeded(W window, long time) throws Exception
InternalWindowProcessFunction
cleanWindowIfNeeded
in class InternalWindowProcessFunction<K,W extends Window>
window
- the window to cleanuptime
- the current timestampException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.