Re: Understanding code of CountTrigger

2016-02-04 Thread Aljoscha Krettek
Very good, you are absolutely right. :D > On 04 Feb 2016, at 05:07, Nirmalya Sengupta > wrote: > > on

Re: Understanding code of CountTrigger

2016-02-03 Thread Nirmalya Sengupta
Hello Aljoscha , I have checked again with the (fantastic) blog here: https://flink.apache.org/news/2015/12/04/Introducing-windows.html and I have come to understand that the contents of a window-buffer must be disposed of *only* after the User-defined evaluation function has seen and used them al

Re: Understanding code of CountTrigger

2016-02-03 Thread Nirmalya Sengupta
Hello Aljoscha , Many thanks for the explanation. Referring to the flow from your response: --- 1. Trigger fires 2. Evictor is called if it exists 3. Elements are evicted from window buffer if evictor returned number > 0 4. User-provide

Re: Understanding code of CountTrigger

2016-02-03 Thread Aljoscha Krettek
Hi Nirmalya, the result of Evictor.evict() is used internally by the window operator. The flow is as follows: 1. Trigger fires 2. Evictor is called if it exists 3. Elements are evicted from window buffer if evictor returned number > 0 4. User-provided window function is called to emit window resul

Re: Understanding code of CountTrigger

2016-02-03 Thread Nirmalya Sengupta
Hello Till , >From your prompt reply: '... the CountTrigger *always* works together with the CountEvictor which will make sure that only .. ' - that explains it. Thanks. I missed it. A related question I have is this: Between the PURGE facility of Trigger and REMOVAL facility of Evictor, is th

Re: Understanding code of CountTrigger

2016-02-03 Thread Till Rohrmann
Hi Nirmalya, the CountTrigger always works together with the CountEvictor which will make sure that only count elements are kept in the window. Evictors can evict elements from the window after the trigger event. That is the reason why the CountTrigger does not have to purge the window explicitly.

Understanding code of CountTrigger

2016-02-02 Thread Nirmalya Sengupta
Hello all, Here's a code comment from org.apache.flink.streaming.api.windowing.triggers.Trigger: /** * Result type for trigger methods. This determines what happens which the window. * * * On {@code FIRE} the pane is evaluated and results are emitted. *The con