Class EventTimeWatermarkHandler


  • public class EventTimeWatermarkHandler
    extends Object
    This class is used to handle EventTimeExtension related watermarks in operator, such as EventTimeExtension.EVENT_TIME_WATERMARK_DECLARATION and EventTimeExtension.IDLE_STATUS_WATERMARK_DECLARATION. It will emit event time watermark and idle status to downstream operators according to received watermarks.
    • Constructor Detail

      • EventTimeWatermarkHandler

        public EventTimeWatermarkHandler​(int numOfInput,
                                         Output<?> output,
                                         @Nullable
                                         InternalTimeServiceManager<?> timeServiceManager)
    • Method Detail

      • getLastEmitWatermark

        public long getLastEmitWatermark()
      • processWatermark

        public EventTimeWatermarkHandler.EventTimeUpdateStatus processWatermark​(org.apache.flink.api.common.watermark.Watermark watermark,
                                                                                int inputIndex)
                                                                         throws Exception
        Process EventTimeWatermark/IdleStatusWatermark.

        It's caller's responsibility to check whether the watermark is EventTimeWatermark/IdleStatusWatermark.

        Returns:
        the status of event time watermark update.
        Throws:
        Exception