Re: How to use operator list state like a HashMap?
Posted by
Tony Wei on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/How-to-use-operator-list-state-like-a-HashMap-tp15701p15708.html
Hi Fabian,
This is a good advice, but I had already tried adding random value to my data and it seems not very useful.
The key set of my data is small, around 10 ~ 20. If the range of random number is small, the distribution might not be better, even worse. I think the reason is that KeyedStream uses murmur hash to partition key and it wouldn't guarantee the distribution is fair.
Of course if the range of random number is large enough, the probability of even distribution is higher. It means I need to cache more data in state because the data with the original key would be separated to a larger key set. I would prefer to avoid this situation.
Best Regards,
Tony Wei