Interface TimestampsAndWatermarks<T>

Type Parameters:
T - The type of the emitted records.
All Known Implementing Classes:
NoOpTimestampsAndWatermarks, ProgressiveTimestampsAndWatermarks

@Internal public interface TimestampsAndWatermarks<T>
Basic interface for the timestamp extraction and watermark generation logic for the SourceReader.

Implementations of this class may or may not actually perform certain tasks, like watermark generation. For example, the batch-oriented implementation typically skips all watermark generation logic.

  • Method Details

    • createMainOutput

      org.apache.flink.api.connector.source.ReaderOutput<T> createMainOutput(PushingAsyncDataInput.DataOutput<T> output, TimestampsAndWatermarks.WatermarkUpdateListener watermarkCallback)
      Creates the ReaderOutput for the source reader, than internally runs the timestamp extraction and watermark generation.
    • startPeriodicWatermarkEmits

      void startPeriodicWatermarkEmits()
      Starts 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.

    • stopPeriodicWatermarkEmits

      void stopPeriodicWatermarkEmits()
      Stops emitting periodic watermarks.
    • emitImmediateWatermark

      void emitImmediateWatermark(long wallClockTimestamp)
      Emit a watermark immediately.
    • pauseOrResumeSplits

      void pauseOrResumeSplits(Collection<String> splitsToPause, Collection<String> splitsToResume)
    • createProgressiveEventTimeLogic

      static <E> TimestampsAndWatermarks<E> createProgressiveEventTimeLogic(org.apache.flink.api.common.eventtime.WatermarkStrategy<E> watermarkStrategy, org.apache.flink.metrics.MetricGroup metrics, ProcessingTimeService timeService, long periodicWatermarkIntervalMillis, org.apache.flink.util.clock.RelativeClock mainInputActivityClock, org.apache.flink.util.clock.Clock clock, TaskIOMetricGroup taskIOMetricGroup)
    • createNoOpEventTimeLogic

      static <E> TimestampsAndWatermarks<E> createNoOpEventTimeLogic(org.apache.flink.api.common.eventtime.WatermarkStrategy<E> watermarkStrategy, org.apache.flink.metrics.MetricGroup metrics, org.apache.flink.util.clock.RelativeClock inputActivityClock)