Class ProgressiveTimestampsAndWatermarks<T>
- java.lang.Object
-
- org.apache.flink.streaming.api.operators.source.ProgressiveTimestampsAndWatermarks<T>
-
- Type Parameters:
T- The type of the emitted records.
- All Implemented Interfaces:
TimestampsAndWatermarks<T>
@Internal public class ProgressiveTimestampsAndWatermarks<T> extends Object implements TimestampsAndWatermarks<T>
An implementation ofTimestampsAndWatermarksthat does periodic watermark emission and keeps track of watermarks on a per-split basis. This should be used in execution contexts where watermarks are important for efficiency/correctness, for example in STREAMING execution mode.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.operators.source.TimestampsAndWatermarks
TimestampsAndWatermarks.WatermarkUpdateListener
-
-
Constructor Summary
Constructors Constructor Description ProgressiveTimestampsAndWatermarks(org.apache.flink.api.common.eventtime.TimestampAssigner<T> timestampAssigner, org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier<T> watermarksFactory, org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier.Context watermarksContext, ProcessingTimeService timeService, Duration periodicWatermarkInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.api.connector.source.ReaderOutput<T>createMainOutput(PushingAsyncDataInput.DataOutput<T> output, TimestampsAndWatermarks.WatermarkUpdateListener watermarkUpdateListener)Creates the ReaderOutput for the source reader, than internally runs the timestamp extraction and watermark generation.voidstartPeriodicWatermarkEmits()Starts emitting periodic watermarks, if this implementation produces watermarks, and if periodic watermarks are configured.voidstopPeriodicWatermarkEmits()Stops emitting periodic watermarks.
-
-
-
Constructor Detail
-
ProgressiveTimestampsAndWatermarks
public ProgressiveTimestampsAndWatermarks(org.apache.flink.api.common.eventtime.TimestampAssigner<T> timestampAssigner, org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier<T> watermarksFactory, org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier.Context watermarksContext, ProcessingTimeService timeService, Duration periodicWatermarkInterval)
-
-
Method Detail
-
createMainOutput
public org.apache.flink.api.connector.source.ReaderOutput<T> createMainOutput(PushingAsyncDataInput.DataOutput<T> output, TimestampsAndWatermarks.WatermarkUpdateListener watermarkUpdateListener)
Description copied from interface:TimestampsAndWatermarksCreates the ReaderOutput for the source reader, than internally runs the timestamp extraction and watermark generation.- Specified by:
createMainOutputin interfaceTimestampsAndWatermarks<T>
-
startPeriodicWatermarkEmits
public void startPeriodicWatermarkEmits()
Description copied from interface:TimestampsAndWatermarksStarts emitting periodic watermarks, if this implementation produces watermarks, and if periodic watermarks are configured.Periodic watermarks are produced by periodically calling the
WatermarkGenerator.onPeriodicEmit(WatermarkOutput)method of the underlying Watermark Generators.- Specified by:
startPeriodicWatermarkEmitsin interfaceTimestampsAndWatermarks<T>
-
stopPeriodicWatermarkEmits
public void stopPeriodicWatermarkEmits()
Description copied from interface:TimestampsAndWatermarksStops emitting periodic watermarks.- Specified by:
stopPeriodicWatermarkEmitsin interfaceTimestampsAndWatermarks<T>
-
-