Hi,
Need to calculate a 4 hour time window for count, sum with current calculated results being output every 5 mins. How do i do that ? Currently, I calculate results for 5 sec and 5 min time windows fine on the KeyedStream. Time timeWindow = getTimeWindowFromInterval(interval);//eg: timeWindow = Time.seconds(timeIntervalL); TIA, Vijay |
I am also implementing the ProcessWindowFunction and accessing the windowState to get data but how do i push data out every 5 mins during a 4 hr time window ?? I am adding a globalState to handle the 4 hr window ??? Or should I still use the context.windowState even for the 4 hr window ? public class MGroupingAggregateClass extends ProcessWindowFunction<....> { On Mon, Jun 17, 2019 at 10:06 AM Vijay Balakrishnan <[hidden email]> wrote:
|
Hi Vijay, When using windows, you may use the 'trigger' to set a Custom Trigger which would trigger your ProcessWindowFunction accordingly. In your case, you would probably use: .trigger(ContinuousProcessingTimeTrigger.of(Time.minutes(5))) Thanks, Rafi On Mon, Jun 17, 2019 at 9:01 PM Vijay Balakrishnan <[hidden email]> wrote:
|
Hi Vijay, I managed by using "ctx.timerService().registerProcessingTimeTimer(timeoutTime);" on the processElement method and clearing the state on the onTimer method. This is my program [1]. Kind Regards, On Mon, Jun 17, 2019 at 8:57 PM Rafi Aroch <[hidden email]> wrote:
|
Hi Felipe, Thanks for the example. I will try a variation of that for mine. Is there a specific reason to use the HyperLogLogState ? Vijay On Tue, Jun 18, 2019 at 3:00 AM Felipe Gutierrez <[hidden email]> wrote:
|
No, there is no specific reason. I am using it because I am computing the HyperLogLog over a window. On Mon, Jul 1, 2019 at 12:34 AM Vijay Balakrishnan <[hidden email]> wrote:
|
Hi Rafi, I tried your approach with: windowStream.trigger(ContinuousEventTimeTrigger.of(Time.minutes(5))); I can use .trigger with ProcessWindowFunction but it doesn't accumulate data across windows i.e I want to collect data for a 5h window with data sent to output every 5 mins with the output data getting accumulated after every 5 mins. @Felipe- I am using a ProcessWindowFunction and cannot find a way to use process() & onTimer with it. On Sun, Jun 30, 2019 at 11:45 PM Felipe Gutierrez <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |