T - The type of the emitted records.@Internal public class ProgressiveTimestampsAndWatermarks<T> extends Object implements TimestampsAndWatermarks<T>
TimestampsAndWatermarks that 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.TimestampsAndWatermarks.TimestampsAndWatermarksContextProvider, TimestampsAndWatermarks.WatermarkUpdateListener| Constructor and Description |
|---|
ProgressiveTimestampsAndWatermarks(org.apache.flink.api.common.eventtime.TimestampAssigner<T> timestampAssigner,
org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier<T> watermarksFactory,
TimestampsAndWatermarks.TimestampsAndWatermarksContextProvider watermarksContextProvider,
ProcessingTimeService timeService,
Duration periodicWatermarkInterval,
org.apache.flink.util.clock.RelativeClock mainInputActivityClock,
org.apache.flink.util.clock.Clock clock,
org.apache.flink.runtime.metrics.groups.TaskIOMetricGroup taskIOMetricGroup) |
| Modifier and Type | Method and 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.
|
void |
emitImmediateWatermark(long wallClockTimestamp)
Emit a watermark immediately.
|
void |
pauseOrResumeSplits(Collection<String> splitsToPause,
Collection<String> splitsToResume) |
void |
startPeriodicWatermarkEmits()
Starts emitting periodic watermarks, if this implementation produces watermarks, and if
periodic watermarks are configured.
|
void |
stopPeriodicWatermarkEmits()
Stops emitting periodic watermarks.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateNoOpEventTimeLogic, createProgressiveEventTimeLogicpublic ProgressiveTimestampsAndWatermarks(org.apache.flink.api.common.eventtime.TimestampAssigner<T> timestampAssigner, org.apache.flink.api.common.eventtime.WatermarkGeneratorSupplier<T> watermarksFactory, TimestampsAndWatermarks.TimestampsAndWatermarksContextProvider watermarksContextProvider, ProcessingTimeService timeService, Duration periodicWatermarkInterval, org.apache.flink.util.clock.RelativeClock mainInputActivityClock, org.apache.flink.util.clock.Clock clock, org.apache.flink.runtime.metrics.groups.TaskIOMetricGroup taskIOMetricGroup)
public org.apache.flink.api.connector.source.ReaderOutput<T> createMainOutput(PushingAsyncDataInput.DataOutput<T> output, TimestampsAndWatermarks.WatermarkUpdateListener watermarkUpdateListener)
TimestampsAndWatermarkscreateMainOutput in interface TimestampsAndWatermarks<T>public void startPeriodicWatermarkEmits()
TimestampsAndWatermarksPeriodic watermarks are produced by periodically calling the WatermarkGenerator.onPeriodicEmit(WatermarkOutput)
method of the underlying Watermark Generators.
startPeriodicWatermarkEmits in interface TimestampsAndWatermarks<T>public void stopPeriodicWatermarkEmits()
TimestampsAndWatermarksstopPeriodicWatermarkEmits in interface TimestampsAndWatermarks<T>public void emitImmediateWatermark(long wallClockTimestamp)
TimestampsAndWatermarksemitImmediateWatermark in interface TimestampsAndWatermarks<T>public void pauseOrResumeSplits(Collection<String> splitsToPause, Collection<String> splitsToResume)
pauseOrResumeSplits in interface TimestampsAndWatermarks<T>Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.