public class CountTumblingWindowAssigner extends GroupWindowAssigner<CountWindow>
GroupWindowAssigner that windows elements into fixed-size windows based on the count
number of the elements. Windows cannot 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 CountTumblingWindowAssigner |
of(long size) |
void |
open(InternalWindowProcessFunction.Context<?,CountWindow> ctx)
Initialization method for the function.
|
String |
toString() |
public void open(InternalWindowProcessFunction.Context<?,CountWindow> ctx) throws Exception
GroupWindowAssigneropen 在类中 GroupWindowAssigner<CountWindow>Exceptionpublic Collection<CountWindow> assignWindows(org.apache.flink.table.data.RowData element, long timestamp) throws IOException
GroupWindowAssignerassignWindows 在类中 GroupWindowAssigner<CountWindow>element - The element to which windows should be assigned.timestamp - The timestamp of the element when GroupWindowAssigner.isEventTime() returns true, or
the current system time when GroupWindowAssigner.isEventTime() returns false. The timestamp value is
mapping to UTC milliseconds for splitting windows simply.IOExceptionpublic org.apache.flink.api.common.typeutils.TypeSerializer<CountWindow> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
GroupWindowAssignerTypeSerializer for serializing windows that are assigned by this WindowAssigner.public boolean isEventTime()
GroupWindowAssignertrue if elements are assigned to windows based on event time, false
otherwise.isEventTime 在类中 GroupWindowAssigner<CountWindow>public String toString()
toString 在类中 GroupWindowAssigner<CountWindow>public static CountTumblingWindowAssigner of(long size)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.