@Internal public final class AssignerWithPeriodicWatermarksAdapter<T> extends Object implements WatermarkGenerator<T>
AssignerWithPeriodicWatermarks
into a WatermarkGenerator
.Modifier and Type | Class and Description |
---|---|
static class |
AssignerWithPeriodicWatermarksAdapter.Strategy<T>
A WatermarkStrategy that returns an
AssignerWithPeriodicWatermarks wrapped as a
WatermarkGenerator . |
Constructor and Description |
---|
AssignerWithPeriodicWatermarksAdapter(AssignerWithPeriodicWatermarks<T> wms) |
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.
|
public AssignerWithPeriodicWatermarksAdapter(AssignerWithPeriodicWatermarks<T> wms)
public void onEvent(T event, long eventTimestamp, WatermarkOutput output)
WatermarkGenerator
onEvent
in interface WatermarkGenerator<T>
public void onPeriodicEmit(WatermarkOutput output)
WatermarkGenerator
The interval in which this method is called and Watermarks are generated depends on ExecutionConfig.getAutoWatermarkInterval()
.
onPeriodicEmit
in interface WatermarkGenerator<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.