flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kien Truong <duckientru...@gmail.com>
Subject Re: Apache Flink - Question about thread safety for stateful collections (MapState)
Date Sun, 12 Nov 2017 01:47:54 GMT
Hi Mans,

They're not executed in the same thread, but the methods that called 
them are synchronized[1] and therefore thread-safe.

Best regards,



On 11/12/2017 4:30 AM, M Singh wrote:
> Hi:
> I am working on a project and need to save MapState in a process 
> function and register a timer to check for updates.  I wanted to find 
> out if it is safe to access and modify the state in the 
> processElement function as well as the time onTimer methods.
> The example 
> https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/process_function.html use

> ValueState and does not use synchronization. Is it because 
> processElement and onTimer are executed in the same thread and so are 
> thread safe ?
> Also, I could not find any thread safety documentation about MapState.
> Thanks.
> Mans

View raw message