Class AlignedWatermarkCombiner

  • All Implemented Interfaces:
    WatermarkCombiner

    public class AlignedWatermarkCombiner
    extends Object
    implements WatermarkCombiner
    A WatermarkCombiner is design to align Watermarks. It will combine watermarks after receiving watermarks from all upstream input channels.

    The combine process will perform the following three steps: (1) send the combined watermark (actually the last received watermark) to downstream, (2) clear the received watermarks, (3) resume input gate.

    Note that the aligned Watermarks should have the same value within a batch.

    • Constructor Detail

      • AlignedWatermarkCombiner

        public AlignedWatermarkCombiner​(int numberOfInputChannels,
                                        Runnable gateResumer)
    • Method Detail

      • combineWatermark

        public void combineWatermark​(org.apache.flink.api.common.watermark.Watermark watermark,
                                     int channelIndex,
                                     Consumer<org.apache.flink.api.common.watermark.Watermark> watermarkEmitter)
                              throws Exception
        Specified by:
        combineWatermark in interface WatermarkCombiner
        Throws:
        Exception