title: What is the difference between spark.task.cpus and --executor-cores
body: <p>In my mapPartition part, there are multi-threading works to do, I use thread pool and want to run a task in parallel. But I cannot distinguish these two parameters.
  I guess I can set <strong>--executor-cores</strong> to 5, and I run 4 threads in my task. Is this right?</p>