flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kostas Kloudas <k.klou...@data-artisans.com>
Subject Re: Iterating over keys in state backend
Date Thu, 27 Apr 2017 08:19:01 GMT
Hi Ken,

Unfortunately, iterating over all keys is not currently supported.

Do you have your own custom operator (because you mention “from within the operator…”)
or
you have a process function (because you mention the “onTimer” method)?

Also, could you describe your use case a bit more?  You have a periodic timer per key and
when
a timer for a given key fires you want to have access to the state of all the keys?

Thanks,
Kostas

> On Apr 27, 2017, at 3:02 AM, Ken Krugler <kkrugler_lists@transpac.com> wrote:
> 
> Is there a way to iterate over all of the key/value entries in the state backend, from
within the operator that’s making use of the same?
> 
> E.g. I’ve got a ReducingState, and on a timed interval (inside of the onTimer method)
I need to iterate over all KV state and emit the N “best” entries.
> 
> What’s the recommended approach?
> 
> Thanks,
> 
> — Ken
> 


Mime
View raw message