flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yan Zhou [FDS Science] ­ <yz...@coupang.com>
Subject How to clear registered timers for a merged window?
Date Mon, 25 Sep 2017 20:59:11 GMT

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.


View raw message