Clarification in TumblingProcessing TimeWindow Documentation
Posted by
Dhruv Kumar on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Clarification-in-TumblingProcessing-TimeWindow-Documentation-tp20359.html
Hi
/** |
| * A {@link WindowAssigner} that windows elements into windows based on the current |
| * system time of the machine the operation is running on. Windows cannot overlap. |
| * |
| * <p>For example, in order to window into windows of 1 minute, every 10 seconds: |
| * <pre> {@code |
| * DataStream<Tuple2<String, Integer>> in = ...; |
| * KeyedStream<String, Tuple2<String, Integer>> keyed = in.keyBy(...); |
| * WindowedStream<Tuple2<String, Integer>, String, TimeWindows> windowed = |
| * keyed.window(TumblingProcessingTimeWindows.of(Time.of(1, MINUTES), Time.of(10, SECONDS)); |
| * } </pre> |
| */
|
It says one can have tumbling windows of 1 minute, every 10 seconds. Doesn’t this become a sliding window then? The
SlidingProcessTimeWindows.java has the exact same documentation with just one tiny change (“Windows can possibly overlap”). It seems to me that in the above documentation, the second Time argument of 10 seconds is for providing the window offset (as confirmed
here) and not for starting the tumbling window every 10 seconds.
Thanks
--------------------------------------------------
Dhruv KumarPhD Candidate
Department of Computer Science and Engineering
University of Minnesota
www.dhruvkumar.me