@PublicEvolving public final class SlidingAlignedProcessingTimeWindows extends BaseAlignedWindowAssigner
Prior Flink versions used that operator automatically for simple processing time windows (tumbling and sliding) when no custom trigger and no evictor was specified. In the current Flink version, that operator is only used when programs explicitly specify this window assigner. This is only intended for special cases where programs relied on the better performance of the fast aligned window operator, and are willing to accept the lack of support for various features as indicated below:
Future implementation plans: We plan to add some of the optimizations used by this operator to the general window operator, so that future versions of Flink will not have the performance/functionality trade-off any more.
Note on implementation: The concrete operator instantiated by this assigner is either the
org.apache.flink.streaming.runtime.operators.windowing.AggregatingProcessingTimeWindowOperator
or org.apache.flink.streaming.runtime.operators.windowing.AccumulatingProcessingTimeWindowOperator
.
WindowAssigner.WindowAssignerContext
Constructor and Description |
---|
SlidingAlignedProcessingTimeWindows(long size,
long slide) |
Modifier and Type | Method and Description |
---|---|
long |
getSlide() |
static SlidingAlignedProcessingTimeWindows |
of(Time size,
Time slide)
Creates a new
SlidingAlignedProcessingTimeWindows WindowAssigner that assigns
elements to sliding time windows based on the element timestamp. |
assignWindows, getDefaultTrigger, getSize, getWindowSerializer, isEventTime
public SlidingAlignedProcessingTimeWindows(long size, long slide)
public long getSlide()
public static SlidingAlignedProcessingTimeWindows of(Time size, Time slide)
SlidingAlignedProcessingTimeWindows
WindowAssigner
that assigns
elements to sliding time windows based on the element timestamp.size
- The size of the generated windows.slide
- The slide interval of the generated windows.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.