Class PunctuatedWatermarkAssignerWrapper

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.eventtime.TimestampAssigner<org.apache.flink.table.data.RowData>, org.apache.flink.api.common.functions.Function, org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks<org.apache.flink.table.data.RowData>, org.apache.flink.streaming.api.functions.TimestampAssigner<org.apache.flink.table.data.RowData>

    @Internal
    public class PunctuatedWatermarkAssignerWrapper
    extends Object
    implements org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks<org.apache.flink.table.data.RowData>
    Generates periodic watermarks based on a PunctuatedWatermarkAssigner.
    See Also:
    Serialized Form
    • Constructor Detail

      • PunctuatedWatermarkAssignerWrapper

        public PunctuatedWatermarkAssignerWrapper​(org.apache.flink.table.sources.wmstrategies.PunctuatedWatermarkAssigner assigner,
                                                  int timeFieldIdx,
                                                  org.apache.flink.table.types.DataType sourceType)
        Parameters:
        timeFieldIdx - the index of the rowtime attribute.
        assigner - the watermark assigner.
        sourceType - the type of source
    • Method Detail

      • checkAndGetNextWatermark

        @Nullable
        public org.apache.flink.streaming.api.watermark.Watermark checkAndGetNextWatermark​(org.apache.flink.table.data.RowData row,
                                                                                           long extractedTimestamp)
        Specified by:
        checkAndGetNextWatermark in interface org.apache.flink.streaming.api.functions.AssignerWithPunctuatedWatermarks<org.apache.flink.table.data.RowData>
      • extractTimestamp

        public long extractTimestamp​(org.apache.flink.table.data.RowData element,
                                     long recordTimestamp)
        Specified by:
        extractTimestamp in interface org.apache.flink.api.common.eventtime.TimestampAssigner<org.apache.flink.table.data.RowData>
        Specified by:
        extractTimestamp in interface org.apache.flink.streaming.api.functions.TimestampAssigner<org.apache.flink.table.data.RowData>