Class CountTumblingWindowAssigner
java.lang.Object
org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<CountWindow>
org.apache.flink.table.runtime.operators.window.groupwindow.assigners.CountTumblingWindowAssigner
- All Implemented Interfaces:
Serializable
A
GroupWindowAssigner that windows elements into fixed-size windows based on the count
number of the elements. Windows cannot overlap.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionassignWindows(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.org.apache.flink.api.common.typeutils.TypeSerializer<CountWindow>getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig) Returns aTypeSerializerfor serializing windows that are assigned by thisWindowAssigner.booleanReturnstrueif elements are assigned to windows based on event time,falseotherwise.static CountTumblingWindowAssignerof(long size) voidInitialization method for the function.toString()
-
Method Details
-
open
Description copied from class:GroupWindowAssignerInitialization method for the function. It is called before the actual working methods.- Overrides:
openin classGroupWindowAssigner<CountWindow>- Throws:
Exception
-
assignWindows
public Collection<CountWindow> assignWindows(org.apache.flink.table.data.RowData element, long timestamp) throws IOException Description copied from class:GroupWindowAssignerGiven the timestamp and element, returns the set of windows into which it should be placed.- Specified by:
assignWindowsin classGroupWindowAssigner<CountWindow>- Parameters:
element- The element to which windows should be assigned.timestamp- The timestamp of the element whenGroupWindowAssigner.isEventTime()returns true, or the current system time whenGroupWindowAssigner.isEventTime()returns false. The timestamp value is mapping to UTC milliseconds for splitting windows simply.- Throws:
IOException
-
getWindowSerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<CountWindow> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig) Description copied from class:GroupWindowAssignerReturns aTypeSerializerfor serializing windows that are assigned by thisWindowAssigner.- Specified by:
getWindowSerializerin classGroupWindowAssigner<CountWindow>
-
isEventTime
public boolean isEventTime()Description copied from class:GroupWindowAssignerReturnstrueif elements are assigned to windows based on event time,falseotherwise.- Specified by:
isEventTimein classGroupWindowAssigner<CountWindow>
-
toString
- Specified by:
toStringin classGroupWindowAssigner<CountWindow>
-
of
-