Class CountSlidingWindowAssigner
- java.lang.Object
-
- org.apache.flink.table.runtime.operators.window.groupwindow.assigners.GroupWindowAssigner<CountWindow>
-
- org.apache.flink.table.runtime.operators.window.groupwindow.assigners.CountSlidingWindowAssigner
-
- All Implemented Interfaces:
Serializable
public class CountSlidingWindowAssigner extends GroupWindowAssigner<CountWindow>
AGroupWindowAssignerthat windows elements into sliding windows based on the count number of the elements. Windows can possibly overlap.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<CountWindow>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.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.booleanisEventTime()Returnstrueif elements are assigned to windows based on event time,falseotherwise.static CountSlidingWindowAssignerof(long windowSize, long windowSlide)voidopen(InternalWindowProcessFunction.Context<?,CountWindow> ctx)Initialization method for the function.StringtoString()
-
-
-
Method Detail
-
open
public void open(InternalWindowProcessFunction.Context<?,CountWindow> ctx) throws Exception
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
public String toString()
- Specified by:
toStringin classGroupWindowAssigner<CountWindow>
-
of
public static CountSlidingWindowAssigner of(long windowSize, long windowSlide)
-
-