Hi, the current behavior is in fact that the window will be triggered every “slide-size” elements and the computation will take into account the last “window-size” elements. So for a window with window-size 10 and slide-size 5 the window will be triggered every 5 elements. This means that your observation is correct and the first window will only contain the first 5 elements, the next one will contain the first 10 elements and so on.
Cheers, Aljoscha > On 14 Dec 2015, at 14:24, Nirmalya Sengupta <sengupta.nirma...@gmail.com> > wrote: > > Hello Aljoscha <aljos...@apache.org>, > > > Thanks for the explanation about the semantics of CountWindowAll's parameters. > > However, I am thinking about it and what strikes me is this: > > If I call CountWindowAll(10,5) then what I am instructing Flink to do is to > > 1) Collect first 10 > 2) Call max() function > > and, *then* begin the slider and > > 3) take 1 out and 1 in so that count of elements in the window remains 10 (or > less if fewer than 5 events appear) > 4) Call max function with this (n -1 + 1) elements > > Isn't this the way that API is to be understood? > > What we observe instead, is that max function is called once after first 5 > arrive, and once more after second 5 arrive. So, the first max misleads > because my intention is to find max of 10 elements and never of 5 elements. > > Please make me wiser. > > -- Nirmalya > > -- > Software Technologist > http://www.linkedin.com/in/nirmalyasengupta > "If you have built castles in the air, your work need not be lost. That is > where they should be. > Now put the foundation under them."