Yes, that is correct. The first element will be lost.

In fact, you do neither need a trigger nor an evictor if you want to get
the max element for each group of 5 elements.
See my reply on your other mail.

Cheers,
Fabian

2015-11-30 18:47 GMT+01:00 Nirmalya Sengupta <sengupta.nirma...@gmail.com>:

> Hello Aljoscha <aljos...@apache.org>,
>
> Many thanks for taking time to explain the behaviour of Evictor. The
> essence of my original post - about how the guide explains an Evictor - was
> this. I think the guide should make this (counterintuitive) explanation of
> the parameter to Evictor clearer. May help others, yet uninitiated in the
> world of Flink! :-)
>
> Because you have offered to clarify further, given the following code
> snippet:
>
> .....
> .trigger(CountTrigger.of(5))
>       .evictor(CountEvictor.of(4))
>          .maxBy(1)
>
> my understanding (after reading your mail) is that if I am not careful
> about the parameters I pass to CountTrigger and CountEvictor, my function
> may not work correctly. In this case, when the window is filled with 5
> events, Evictor removes the first event and leaves 4. Thus, the function
> never sees the 1st event.
>
> Have I understood correctly? Will be happy to hear from you.
>
> -- 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."
>

Reply via email to