flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From M Singh <mans2si...@yahoo.com>
Subject Apache Flink - Question about thread safety for stateful collections (MapState)
Date Sat, 11 Nov 2017 21:30:23 GMT
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.

View raw message