flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Joireman <paul.joire...@physiq.com>
Subject Windows and Watermarks Clarification
Date Thu, 01 Sep 2016 18:16:17 GMT
Hi all,


Just a point of clarification on how watermarks are generated.   I'd like to use a SlidingEventTime
window of say 5 minutes with a 30 second slide.  The incoming data stream has elements from
which I can extract the timestamp but they may come out of order so I chose to implement the
following timestamp assigner.


     my_stream.assignTimestampsAndWatermarks(
      new BoundedOutOfOrdernessTimestampExtractor<MyElement>(Time.seconds(10)) {
          @Override
          public long extractTimestamp(final MyElement element) {
              return element.getTimestamp();
          }
  });

With this definition and the code for BoundedOutOfOrdernessTimestampExtractor, my understanding
is that for each incoming element a watermark will be generated that is 10 seconds behind
the current timestamp.    If any the end time of any of the sliding windows is earlier that
an emitted watermark that (or those) windows will fire initiating a processing on the window(s).
  Is this correct?

Paul


Mime
View raw message