Re: How to use operator list state like a HashMap?
Posted by
Fabian Hueske-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/How-to-use-operator-list-state-like-a-HashMap-tp15701p15705.html
Hi Tony,
operator state can only be kept on the heap.
One thing you could try is to add a random value to you data and keyBy on a composite key that consists of your original key and the random value.
It is important though, that you actually add the random value to your data to ensure that the extracted key is always the same, i.e., deterministic with respect to the data.
This should evenly distribute your data and allow you to use keyed MapState.
Hope this helps,
Fabian