Re: Operation of Windows and Triggers

2016-04-21 Thread Piyush Shrivastava
Hi all,Thanks a lot for your valuable suggestions. I am trying to implement the logic of creating a custom trigger with a GlobalWindow which fires the window in one minute for the first time and every five seconds after that, if this logic works I will change it to one hour and five minutes resp

Re: Operation of Windows and Triggers

2016-04-20 Thread Aljoscha Krettek
Just to clarify, the state of a Trigger on GlobalWindows is still local to the key of the element that is in the window(s). On Wed, 20 Apr 2016 at 18:11 Fabian Hueske wrote: > Hi Piyush, > > that's not trivial to implement. You can only do that with a so-called > GlobalWindow, i.e., a window whi

Re: Operation of Windows and Triggers

2016-04-20 Thread Fabian Hueske
Hi Piyush, that's not trivial to implement. You can only do that with a so-called GlobalWindow, i.e., a window which receives all elements of a partition, and a custom trigger which has state to decide whether it has triggered the first window or not. It won't work with a CountTrigger. Best, Fabi

Re: Operation of Windows and Triggers

2016-04-20 Thread Piyush Shrivastava
Hi Fabian, Thanks for the information. I also quickly want to ask that if I implement a custom trigger that fires in one hour for the first time and then every five minutes, what all functions do I need to use?I am considering creating my own trigger referring the code here:https://github.com/a

Re: Operation of Windows and Triggers

2016-04-20 Thread Fabian Hueske
Hi Piyush, if you explicitly set a trigger, the default trigger of the window is replaced. In your example, the time trigger is replaced by the count trigger, i.e., the window is only evaluated after the 100th element was received. This blog post discusses windows and triggers [1]. Best, Fabian

Operation of Windows and Triggers

2016-04-20 Thread Piyush Shrivastava
I wanted to know how Windows and Triggers work in Flink. I am creating a time window of 20 seconds and a count trigger of 100. stream.keyBy(0) .timeWindow(Time.seconds(20)) .trigger(CountTrigger.of(100)) In this case, when will my window get triggered? When 20 seconds has