Wenshuai Hou created FLINK-12714:
------------------------------------
Summary: confusion about flink time window TimeWindow#getWindowStartWithOffset
Key: FLINK-12714
URL:
https://issues.apache.org/jira/browse/FLINK-12714 Project: Flink
Issue Type: Improvement
Components: flink-contrib
Affects Versions: 1.8.0
Reporter: Wenshuai Hou
hi flink team, i think the flink doc on how time windows are created an 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? 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
{code:java}
/**
* 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) {
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)