Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-21 Thread Anchit Jatana
Hi All, I have a use case where in I'm supposed to work with Session Windows to maintain some values for some sessionIDs/keys. The use case is as follows: I need to maintain a session window for the incoming data and discard the window after some set gap/period of inactivity but what I want is t

Re: Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-21 Thread Manu Zhang
Hi Anchit, I think you need a customized EventTimeTrigger which returns "TriggerResult.FIRE" both on new element and watermark. Thanks, Manu

RE: Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-21 Thread bart.kastermans
gerContext: TriggerContext): TriggerResult = { println("even time trigger") TriggerResult.CONTINUE } } Van: Manu Zhang [owenzhang1...@gmail.com] Verzonden: vrijdag 21 oktober 2016 10:52 Aan: user@flink.apache.org Onderwerp: Re: Session windows - Evaluation of ad

RE: Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-21 Thread Anchit Jatana
Hi Bart, Thank you so much for sharing the approach. Looks like this solved my problem. Here's what I have as an implementation for my use-case: package org.apache.flink.quickstart import org.apache.flink.api.common.state.{ ReducingState, ReducingStateDescriptor, ValueState, ValueStateDescriptor

Re: Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-25 Thread Aljoscha Krettek
Hi Bart, are you using your custom Trigger together with a merging session window assigner? You might want to consider overriding the clear() method in your trigger to clean up the state that you use. If you don't you might run into memory leaks because the state is never cleaned up. Cheers, Aljo

Re: Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-28 Thread Anchit Jatana
Hi Aljoscha, I am using the custom trigger with GlobalWindows window assigner. Do I still need to override clear method and delete the ProcessingTimeTimer using- triggerContext.deleteProcessingTimeTimer(prevTime)? Regards, Anchit -- View this message in context: http://apache-flink-user-maili

Re: Session windows - Evaluation of addition of element + window expires/gets discarded after some set time of inactivity

2016-10-31 Thread Aljoscha Krettek
Hi Anchit, the timers don't necessarily have to be cleaned up. So you should be good to go. Cheers, Aljoscha On Fri, 28 Oct 2016 at 23:33 Anchit Jatana wrote: > Hi Aljoscha, > > I am using the custom trigger with GlobalWindows window assigner. Do I > still > need to override clear method and de