Class WaterMarkEventGenerator<T extends Serializable>


  • public class WaterMarkEventGenerator<T extends Serializable>
    extends Object
    Tracks tuples across input streams and periodically emits watermark events. Watermark event timestamp is the minimum of the latest tuple timestamps across all the input streams (minus the lag). Once a watermark event is emitted any tuple coming with an earlier timestamp can be considered as late events.
    • Constructor Detail

      • WaterMarkEventGenerator

        public WaterMarkEventGenerator​(WindowManager<T> windowManager,
                                       long watermarkIntervalMs,
                                       int eventTsLagMs,
                                       Set<org.apache.heron.api.generated.TopologyAPI.StreamId> inputStreams,
                                       Map<String,​Object> topoConf)
        Creates a new WatermarkEventGenerator.
        Parameters:
        windowManager - The window manager this generator will submit watermark events to interval
        watermarkIntervalMs - the interval at which watermarks should be emitted
        eventTsLagMs - The max allowed lag behind the last watermark event before an event is considered late
        inputStreams - The input streams this generator is expected to handle
        topoConf - topology configurations
    • Method Detail

      • track

        public boolean track​(org.apache.heron.api.generated.TopologyAPI.StreamId stream,
                             long ts)
        Tracks the timestamp of the event in the stream, returns true if the event can be considered for processing or false if its a late event.
      • run

        public void run()
      • start

        public void start()