@Public public interface WatermarkGenerator<T>
WatermarkGenerator
generates watermarks either based on events or periodically (in a
fixed interval).
Note: This WatermarkGenerator subsumes the previous distinction between the AssignerWithPunctuatedWatermarks
and the AssignerWithPeriodicWatermarks
.
Modifier and Type | Method and Description |
---|---|
void |
onEvent(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.
|
void |
onPeriodicEmit(WatermarkOutput output)
Called periodically, and might emit a new watermark, or not.
|
void onEvent(T event, long eventTimestamp, WatermarkOutput output)
void onPeriodicEmit(WatermarkOutput output)
The interval in which this method is called and Watermarks are generated depends on ExecutionConfig.getAutoWatermarkInterval()
.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.