public class BaseAlignedWindowAssigner extends WindowAssigner<Object,TimeWindow>
WindowAssigner
used to instantiate one of the deprecated
AccumulatingProcessingTimeWindowOperator
and
AggregatingProcessingTimeWindowOperator
.
For assigner that extend this one, the user can check the
TumblingAlignedProcessingTimeWindows
and the SlidingAlignedProcessingTimeWindows
.
WindowAssigner.WindowAssignerContext
Modifier | Constructor and Description |
---|---|
protected |
BaseAlignedWindowAssigner(long size) |
Modifier and Type | Method and Description |
---|---|
Collection<TimeWindow> |
assignWindows(Object element,
long timestamp,
WindowAssigner.WindowAssignerContext context)
Returns a
Collection of windows that should be assigned to the element. |
Trigger<Object,TimeWindow> |
getDefaultTrigger(StreamExecutionEnvironment env)
Returns the default trigger associated with this
WindowAssigner . |
long |
getSize() |
TypeSerializer<TimeWindow> |
getWindowSerializer(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. |
public long getSize()
public Collection<TimeWindow> assignWindows(Object element, long timestamp, WindowAssigner.WindowAssignerContext context)
WindowAssigner
Collection
of windows that should be assigned to the element.assignWindows
in class WindowAssigner<Object,TimeWindow>
element
- The element to which windows should be assigned.timestamp
- The timestamp of the element.context
- The WindowAssigner.WindowAssignerContext
in which the assigner operates.public Trigger<Object,TimeWindow> getDefaultTrigger(StreamExecutionEnvironment env)
WindowAssigner
WindowAssigner
.getDefaultTrigger
in class WindowAssigner<Object,TimeWindow>
public TypeSerializer<TimeWindow> getWindowSerializer(ExecutionConfig executionConfig)
WindowAssigner
TypeSerializer
for serializing windows that are assigned by
this WindowAssigner
.getWindowSerializer
in class WindowAssigner<Object,TimeWindow>
public boolean isEventTime()
WindowAssigner
true
if elements are assigned to windows based on event time,
false
otherwise.isEventTime
in class WindowAssigner<Object,TimeWindow>
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.