Class BoundedOutOfOrdernessWatermarks<T>
- java.lang.Object
-
- org.apache.flink.api.common.eventtime.BoundedOutOfOrdernessWatermarks<T>
-
- All Implemented Interfaces:
WatermarkGenerator<T>
- Direct Known Subclasses:
AscendingTimestampsWatermarks
@Public public class BoundedOutOfOrdernessWatermarks<T> extends Object implements WatermarkGenerator<T>
A WatermarkGenerator for situations where records are out of order, but you can place an upper bound on how far the events are out of order. An out-of-order bound B means that once an event with timestamp T was encountered, no events older thanT - Bwill follow any more.The watermarks are generated periodically. The delay introduced by this watermark strategy is the periodic interval length, plus the out-of-orderness bound.
-
-
Constructor Summary
Constructors Constructor Description BoundedOutOfOrdernessWatermarks(java.time.Duration maxOutOfOrderness)Creates a new watermark generator with the given out-of-orderness bound.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonEvent(T event, long eventTimestamp, WatermarkOutput output)Called for every event, allows the watermark generator to examine and remember the event timestamps, or to emit a watermark based on the event itself.voidonPeriodicEmit(WatermarkOutput output)Called periodically, and might emit a new watermark, or not.
-
-
-
Method Detail
-
onEvent
public void onEvent(T event, long eventTimestamp, WatermarkOutput output)
Description copied from interface:WatermarkGeneratorCalled for every event, allows the watermark generator to examine and remember the event timestamps, or to emit a watermark based on the event itself.- Specified by:
onEventin interfaceWatermarkGenerator<T>
-
onPeriodicEmit
public void onPeriodicEmit(WatermarkOutput output)
Description copied from interface:WatermarkGeneratorCalled periodically, and might emit a new watermark, or not.The interval in which this method is called and Watermarks are generated depends on
ExecutionConfig.getAutoWatermarkInterval().- Specified by:
onPeriodicEmitin interfaceWatermarkGenerator<T>
-
-