Hi Josh,

it's important bit to understand is that the MapState (or any other keyed
state) is scoped per *key* [1]. You can think about it in a way, that for
each key you have a separate "map" that backs it. This is the important
concept behind distributed stream processing, that allows you to
parallelize the computation and still make sure, that all data for the same
key end up in the same partition.

Does this answer your question?

[1]
https://nightlies.apache.org/flink/flink-docs-release-1.14/docs/concepts/stateful-stream-processing/#keyed-state

Best,
D.

Reply via email to