T
- The type of elements that this WindowAssigner can assign windows to.W
- The type of Window
that this assigner assigns.@PublicEvolving public abstract class WindowAssigner<T,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
WindowFunction
is applied
to produce output elements for that pane.
Constructor and Description |
---|
WindowAssigner() |
Modifier and Type | Method and Description |
---|---|
abstract Collection<W> |
assignWindows(T element,
long timestamp)
Returns a
Collection of windows that should be assigned to the element. |
abstract Trigger<T,W> |
getDefaultTrigger(StreamExecutionEnvironment env)
Returns the default trigger associated with this
WindowAssigner . |
abstract TypeSerializer<W> |
getWindowSerializer(ExecutionConfig executionConfig)
Returns a
TypeSerializer for serializing windows that are assigned by
this WindowAssigner . |
public abstract Collection<W> assignWindows(T element, long timestamp)
Collection
of windows that should be assigned to the element.element
- The element to which windows should be assigned.timestamp
- The timestamp of the element.public abstract Trigger<T,W> getDefaultTrigger(StreamExecutionEnvironment env)
WindowAssigner
.public abstract TypeSerializer<W> getWindowSerializer(ExecutionConfig executionConfig)
TypeSerializer
for serializing windows that are assigned by
this WindowAssigner
.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.