Hi,

I'm afraid that's not possible. One operator instance is in fact, as you 
suspected, responsible for processing elements with many different keys. Only 
if you use the keyed state abstractions (ValueState, MapState and such) is your 
state "per-key".

Best,
Aljoscha

> On 31. Aug 2017, at 15:12, gerardg <ger...@talaia.io> wrote:
> 
> I'm using a trie tree to match prefixes efficiently in an operator applied to
> a KeyedStream. It can grow quite large so I'd like to store the contents of
> the tree in a keyed MapState so I benefit from incremental checkpoints.
> Then, I'd just need to recreate the tree in memory from the MapState in case
> of failure.
> 
> What I don't clearly see is how to have a tree per key without using a keyed
> ValueState. I guess that just using an instance variable is not recommended?
> or one operator is instantiated per each of the keys?
> 
> Basically, I'd need a way to have variables in memory scoped by key and not
> managed as state by flink.
> 
> Thanks,
> 
> Gerard
> 
> 
> 
> 
> --
> Sent from: 
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Reply via email to