State Descriptors / Queryable State Question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

State Descriptors / Queryable State Question

Joe Olson
If I have a keyed stream going in to a N node Flink stream processor, and I had a job that was keeping a count using a ValueStateDescriptor (per key), would that descriptor be synchronized among all the nodes?

i.e. Are the state descriptors interfaces (ValueStateDescriptor, ListStateDescriptor) threadsafe?If I expose that descriptor via the RunTimeContext, will I get a consistent value back from each of the nodes?

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: State Descriptors / Queryable State Question

Fabian Hueske-2
Hi Joe,

working on a KeyedStream means that the records are partitioned by that key, i.e., all records with the same key are processed by the same thread.
Therefore, only on thread accesses the state for a particular key.
Other tasks do not have read or write access to the state of other tasks.

Best, Fabian

2017-01-26 14:10 GMT+01:00 Joe Olson <[hidden email]>:
If I have a keyed stream going in to a N node Flink stream processor, and I had a job that was keeping a count using a ValueStateDescriptor (per key), would that descriptor be synchronized among all the nodes?

i.e. Are the state descriptors interfaces (ValueStateDescriptor, ListStateDescriptor) threadsafe?If I expose that descriptor via the RunTimeContext, will I get a consistent value back from each of the nodes?

Thanks!