Search code examples
apache-flinkflink-streamingdata-streamwindowing

Flink streaming: when does a global window start?


When using a global window, does the window start from the moment the job starts up and we receive the first event or is it also starting from 00:00:00 1 January 1970 as per this answer: flink Windows, when do they start.


Solution

  • Flink's time windows do not start with the epoch (00:00:00 1 January 1970), but rather are aligned with it. For example, if you are using hour-long processing time windows and start a job at 10:53:00 on 20 October 2021, the first of those hour-long windows will end at 10:59.999 20 October 2021.

    Global windows are not time windows. A global window is a window assigner that assigns every incoming event to the same window, without regard to the timing. Global windows are designed to be used with custom triggering.