W - The type of Window that this assigner assigns.public abstract class WindowAssigner<W extends Window> extends Object implements Serializable
WindowAssigner assigns zero or more Windows to 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
Trigger decides that a certain pane should fire the window to produce output elements for
that pane.
| 构造器和说明 |
|---|
WindowAssigner() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 a
TypeSerializer for serializing windows that are assigned by this WindowAssigner. |
abstract boolean |
isEventTime()
Returns
true if elements are assigned to windows based on event time, false
otherwise. |
void |
open(InternalWindowProcessFunction.Context<?,W> ctx)
Initialization method for the function.
|
abstract String |
toString() |
public void open(InternalWindowProcessFunction.Context<?,W> ctx) throws Exception
Exceptionpublic abstract Collection<W> assignWindows(org.apache.flink.table.data.RowData element, long timestamp) throws IOException
element - The element to which windows should be assigned.timestamp - The timestamp of the element when isEventTime() returns true, or
the current system time when isEventTime() returns false.IOExceptionpublic abstract org.apache.flink.api.common.typeutils.TypeSerializer<W> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
TypeSerializer for serializing windows that are assigned by this WindowAssigner.public abstract boolean isEventTime()
true if elements are assigned to windows based on event time, false
otherwise.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.