Class BoundedOutOfOrderWatermarkGenerator

  • All Implemented Interfaces:
    Serializable, Function, RichFunction

    public class BoundedOutOfOrderWatermarkGenerator
    extends WatermarkGenerator
    A watermark generator for rowtime attributes which are out-of-order by a bounded time interval.

    Emits watermarks which are the observed timestamp minus the specified delay.

    See Also:
    Serialized Form
    • Constructor Detail

      • BoundedOutOfOrderWatermarkGenerator

        public BoundedOutOfOrderWatermarkGenerator​(int rowtimeIndex,
                                                   long delay)
        Parameters:
        rowtimeIndex - the field index of rowtime attribute, the value of rowtime should never be null.
        delay - The delay by which watermarks are behind the observed timestamp.
    • Method Detail

      • currentWatermark

        @Nullable
        public Long currentWatermark​(RowData row)
        Description copied from class: WatermarkGenerator
        Returns the watermark for the current row or null if no watermark should be generated.
        Specified by:
        currentWatermark in class WatermarkGenerator
        Parameters:
        row - The current row.
        Returns:
        The watermark for this row or null if no watermark should be generated.