scala - Concurrent tasks on a Spark executor -


what determines how many tasks can run concurrently on spark executor? maybe kind of thread pool , shared memory resources?

what parameters control behavior?

does mean code used in executors should written thread-safe?

what determines how many tasks can run concurrently on spark executor?

spark maps number tasks on particular executor number of cores allocated it. default, spark assigns 1 core task controlled spark.task.cpus parameter defaults 1.

does mean code used in executors should written thread-safe?

no. working rdds or dataframe/set aimed work locally inside transform, without sharing global resources. should think thread-safety when have global resource execute in parallel inside single executor process, can happen when multiple tasks executed on same executor.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -