类 WaterMarkEventGenerator<T>

java.lang.Object
org.apache.pulsar.functions.windowing.WaterMarkEventGenerator<T>
所有已实现的接口:
Runnable

public class WaterMarkEventGenerator<T> extends Object implements Runnable
Tracks tuples across input topics and periodically emits watermark events. Watermark event timestamp is the minimum of the latest tuple timestamps across all the input topics (minus the lag). Once a watermark event is emitted any tuple coming with an earlier timestamp can be considered as late events.
  • 构造器详细资料

    • WaterMarkEventGenerator

      public WaterMarkEventGenerator(WindowManager<T> windowManager, long intervalMs, long eventTsLagMs, Set<String> inputTopics, org.apache.pulsar.functions.api.Context context)
      Creates a new WatermarkEventGenerator.
      参数:
      windowManager - The window manager this generator will submit watermark events to
      intervalMs - The generator will check if it should generate a watermark event with this intervalMs
      eventTsLagMs - The max allowed lag behind the last watermark event before an event is considered late
      inputTopics - The input topics this generator is expected to handle
  • 方法详细资料

    • track

      public boolean track(String inputTopic, long ts)
      Tracks the timestamp of the event from a topic, returns true if the event can be considered for processing or false if its a late event.
    • run

      public void run()
      指定者:
      run 在接口中 Runnable
    • start

      public void start()
    • shutdown

      public void shutdown()