Class GroupWindowAssigner<W extends Window>
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<W>
-
- Type Parameters:
W- The type ofWindowthat this assigner assigns.
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CountSlidingWindowAssigner,CountTumblingWindowAssigner,MergingWindowAssigner,PanedWindowAssigner,TumblingWindowAssigner
public abstract class GroupWindowAssigner<W extends Window> extends Object implements Serializable
AGroupWindowAssignerassigns zero or moreWindowsto an element.In a window operation, elements are grouped by their key (if available) and by the windows to which it was assigned. The set of elements with the same key and window is called a pane. When a
Triggerdecides that a certain pane should fire the window to produce output elements for that pane.The differences between
GroupWindowAssignerandWindowAssigneris that, this window assigner is translated from the legacy GROUP WINDOW FUNCTION syntax, but the other is from the new window TVF syntax. In the long future,GroupWindowAssignerwill be dropped.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GroupWindowAssigner()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Collection<W>assignWindows(org.apache.flink.table.data.RowData element, long timestamp)Given the timestamp and element, returns the set of windows into which it should be placed.abstract org.apache.flink.api.common.typeutils.TypeSerializer<W>getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)Returns aTypeSerializerfor serializing windows that are assigned by thisWindowAssigner.abstract booleanisEventTime()Returnstrueif elements are assigned to windows based on event time,falseotherwise.voidopen(InternalWindowProcessFunction.Context<?,W> ctx)Initialization method for the function.abstract StringtoString()
-
-
-
Method Detail
-
open
public void open(InternalWindowProcessFunction.Context<?,W> ctx) throws Exception
Initialization method for the function. It is called before the actual working methods.- Throws:
Exception
-
assignWindows
public abstract Collection<W> assignWindows(org.apache.flink.table.data.RowData element, long timestamp) throws IOException
Given the timestamp and element, returns the set of windows into which it should be placed.- Parameters:
element- The element to which windows should be assigned.timestamp- The timestamp of the element whenisEventTime()returns true, or the current system time whenisEventTime()returns false. The timestamp value is mapping to UTC milliseconds for splitting windows simply.- Throws:
IOException
-
getWindowSerializer
public abstract org.apache.flink.api.common.typeutils.TypeSerializer<W> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
Returns aTypeSerializerfor serializing windows that are assigned by thisWindowAssigner.
-
isEventTime
public abstract boolean isEventTime()
Returnstrueif elements are assigned to windows based on event time,falseotherwise.
-
-