Re: Session Window with Custom Trigger

2020-06-24 Thread KristoffSC
I think I've figured it out. I switched to GlobalWidnow with my custom trigger. My Trigger combines processingTime trigger logic and onElement trigger logic. Only one should be executed in scope of particular window. I managed to do this by returning FIRE_AND_PURGE and cleat all timers and state

Re: Session Window with Custom Trigger

2020-06-23 Thread KristoffSC
It seems that I'm clearing the timers in a right way, but there is a new timer created from WindowOperator::registerCleanupTimer method. This one is called from WindowOperator::processElement at the end of both if/else branches. How can I mitigate this? I dont want to have any "late firings" for m

Re: Session Window with Custom Trigger

2020-06-23 Thread KristoffSC
Hi Marco Villalobos-2 unfortunately I don't think Tumbling window will work in my case. The reasons: 1. Window must start only when there is a new event, and previous window is closed. The new Tumbling window is created just after previews one is purged. In my case I have to use SessionWindow wher

Re: Session Window with Custom Trigger

2020-06-23 Thread Marco Villalobos
Hi Kristoff, > On Jun 23, 2020, at 6:52 AM, KristoffSC > wrote: > > Hi all, > I'm using Flink 1.9.2 and I would like to ask about my use case and approach > I've took to meet it. > > The use case: > I have a keyed stream, where I have to buffer messages with logic: > 1. Buffering should sta

Re: Session Window with Custom Trigger

2020-06-23 Thread KristoffSC
One addition: in clear method of my custom trigger I do call ctx.deleteProcessingTimeTimer(window.maxTimestamp()); -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/