Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.8.0
-
None
-
None
Description
hi flink team, i think the flink doc on how time windows are created and the javadoc of related method is a little confusing. They give me the impression that the window-start equals to the timestamp of the first event assigned to that window, however the window-start is actually quantized by the windowSize, see links below. Is this the intention or is this a mistake? If it's intended, can we please leave a comment in flink doc somewhere to make this more clear? I spent 5 hours wondering why my flink tests fail until i find that method.
Thanks
Wen
links:
================
The flink doc from here : https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.html#window-lifecycle
> In a nutshell, a window is created as soon as the first element that should belong to this window arrives
the java doc of this method: org.apache.flink.streaming.api.windowing.windows.TimeWindow#getWindowStartWithOffset
/** * Method to get the window start for a timestamp. * * @param timestamp epoch millisecond to get the window start. * @param offset The offset which window start would be shifted by. * @param windowSize The size of the generated windows. * @return window start */ public static long getWindowStartWithOffset(long timestamp, long offset, long windowSize) {