Hi Alberto,
You can also add another MapState. The key is a timestamps and
the value is the key that you want to discard.
When onTimer() is called, you look up the key in the MapState
and and remove it from the original MapState.
Best, Fabian
2018-03-05 0:48 GMT-08:00 Xingcan Cui :
> Hi Alberto
Hi Alberto,
an ultimate solution for your problem would be a map state with ordered keys
(like a TreeMap), but unfortunately, this is still a WIP feature.
For now, maybe you could "eagerly removeā the outdated value (with
`iterator.remove()`) when iterating the map state in the process functio
Hello,
in a Flink application we have a keyed operator that keeps a map state
(MapState). Some of the elements in the state need a timeout so we
use a Timer.
When the timer is called the state is scoped to the key as expected but we
would like to 'pass' (or have available elsewhere) to onTimer the