flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Richter <s.rich...@data-artisans.com>
Subject Re: How to clear registered timers for a merged window?
Date Tue, 26 Sep 2017 09:17:07 GMT
Hi,

I think that it is currently not possible to delete timers that did not trigger, because currently
some of the data structures used for timers do not support random deletes efficiently. For
the second part of the question about keeping the state of merged windows, I added Aljoscha
in CC who might provide more information about the topic.

Best,
Stefan

> Am 25.09.2017 um 22:59 schrieb Yan Zhou [FDS Science] ­ <yzhou@coupang.com>:
> 
> Hi,
> 
> I am implementing a merge-able trigger, and having a problem in clearing the registered
timers for a merged window (a window has been merged into the merging result). For my implementation,
the trigger registers multiple timers for each element at Trigger#onElement(). State is used
to keep track of the registered event time, so that timer can be removed at Trigger#clear()
later.
> 
> However, clearing the registered timers in this way doesn't work if the window has been
merged. The state of origin window is removed during merging. Method AbstractHeapMergingState#mergeNamespaces()
removes the state of merged window. I think the ContinuousEventTimeTrigger shipped with flink
would have same issue.
> 
> My question is is there a way to keep the state for a merged window? One way I can think
of is to implement a custom heap state that add the state back in AbstractHeapMergingState#mergeState()
method. Or is there a way to clear the timers without using state? Can I twist the internal
timer's source code to expose a method to remove all timers for a specified window?
> 
> Please advise and thank you for your help.
> 
> Best
> Yan


Mime
View raw message