Re: Count Different Codes in a Window

2017-07-24 Thread Fabian Hueske
Hi Raj, You can use ReduceFunction in combination with a WindowFunction [1]. Best, Fabian [1] https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/windows.html#windowfunction-with-incremental-aggregation 2017-07-24 20:31 GMT+02:00 Raj Kumar : > Thanks Fabian. That helped. > > But I

Re: Count Different Codes in a Window

2017-07-24 Thread Raj Kumar
Thanks Fabian. That helped. But I want to access the window start time. AFAIK, reduce can not give this details as it doesn't have timewindow object passed to the reduce method. How can I achieve this ? -- View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.n

Re: Count Different Codes in a Window

2017-07-24 Thread Fabian Hueske
Hi Raj, I would recommend to use a ReduceFunction instead of a WindowFunction. The benefit of ReduceFunction is that it can be eagerly computed whenever an element is put into the window such that the state of the window is only one element. In contrast, the WindowFunction collects all elements of