Thread safety

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

Thread safety

Mohit Anchlia
Trying to understand what parts of flink have thread safety built in them. Key question is, are the objects created in flink shared between threads (slots)? For eg: if I create a sink function and open a file is that shared between threads?
Reply | Threaded
Open this post in threaded view
|

Re: Thread safety

Stephan Ewen
Flink does not share objects between threads of different slots/tasks. An operator sometimes uses multiple threads (main thread, checkpoint thread, timer thread), but these are locked against each other, there is never concurrent access.


One thing to be aware of is that one thread can execute multiple functions, when they are chained. Have a look at the "Concepts" section in the Flink docs.

On Mon, Feb 27, 2017 at 6:19 PM, Mohit Anchlia <[hidden email]> wrote:
Trying to understand what parts of flink have thread safety built in them. Key question is, are the objects created in flink shared between threads (slots)? For eg: if I create a sink function and open a file is that shared between threads?