-
- Downloads
[SPARK-18640] Add synchronization to TaskScheduler.runningTasksByExecutors
## What changes were proposed in this pull request? The method `TaskSchedulerImpl.runningTasksByExecutors()` accesses the mutable `executorIdToRunningTaskIds` map without proper synchronization. In addition, as markhamstra pointed out in #15986, the signature's use of parentheses is a little odd given that this is a pure getter method. This patch fixes both issues. ## How was this patch tested? Covered by existing tests. Author: Josh Rosen <joshrosen@databricks.com> Closes #16073 from JoshRosen/runningTasksByExecutors-thread-safety.
Showing
- core/src/main/scala/org/apache/spark/SparkStatusTracker.scala 1 addition, 1 deletion.../src/main/scala/org/apache/spark/SparkStatusTracker.scala
- core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala 1 addition, 1 deletion.../scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
- core/src/test/scala/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala 2 additions, 2 deletions...a/org/apache/spark/scheduler/TaskSchedulerImplSuite.scala
Please register or sign in to comment