Search code examples
apache-flink

How to Understand Flink Window Semantics?


Could anyone help me answer the question that if there is a 5s time window executing aggregation operations every 2s. The first 2s handle data in window between n and n+5 while the second 2s handle data in window between n+2 and n+7. It seems that the Flink do duplicate work in time of n+2 to n+5. is it that? Any help would be appreciate!


Solution

  • You are right. If you apply a function, that could potentially reuse the result of the first window to compute the second window, currently Flink does not exploit this. Each window in computed from scratch. (However, this optimization in on the development agenda already and will be supported in future releases.)