public class CountSlidingWindowAssigner extends WindowAssigner<CountWindow>
WindowAssigner that windows elements into sliding windows based on the count number
of the elements. Windows can possibly overlap.| 限定符和类型 | 方法和说明 |
|---|---|
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 a
TypeSerializer for serializing windows that are assigned by
this WindowAssigner. |
boolean |
isEventTime()
Returns
true if elements are assigned to windows based on event time,
false otherwise. |
static CountSlidingWindowAssigner |
of(long windowSize,
long windowSlide) |
void |
open(InternalWindowProcessFunction.Context<?,CountWindow> ctx)
Initialization method for the function.
|
String |
toString() |
public void open(InternalWindowProcessFunction.Context<?,CountWindow> ctx) throws Exception
WindowAssigneropen 在类中 WindowAssigner<CountWindow>Exceptionpublic Collection<CountWindow> assignWindows(org.apache.flink.table.data.RowData element, long timestamp) throws IOException
WindowAssignerassignWindows 在类中 WindowAssigner<CountWindow>element - The element to which windows should be assigned.timestamp - The timestamp of the element when WindowAssigner.isEventTime() returns true,
or the current system time when WindowAssigner.isEventTime() returns false.IOExceptionpublic org.apache.flink.api.common.typeutils.TypeSerializer<CountWindow> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
WindowAssignerTypeSerializer for serializing windows that are assigned by
this WindowAssigner.getWindowSerializer 在类中 WindowAssigner<CountWindow>public boolean isEventTime()
WindowAssignertrue if elements are assigned to windows based on event time,
false otherwise.isEventTime 在类中 WindowAssigner<CountWindow>public String toString()
toString 在类中 WindowAssigner<CountWindow>public static CountSlidingWindowAssigner of(long windowSize, long windowSlide)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.