Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15986#discussion_r89416964
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -88,10 +88,12 @@ private[spark] class TaskSchedulerImpl(
       // Incrementing task IDs
       val nextTaskId = new AtomicLong(0)
     
    -  // Number of tasks running on each executor
    -  private val executorIdToTaskCount = new HashMap[String, Int]
    +  // IDs of the tasks running on each executor
    +  private val executorIdToRunningTaskIds = new HashMap[String, 
HashSet[Long]]
     
    -  def runningTasksByExecutors(): Map[String, Int] = 
executorIdToTaskCount.toMap
    +  def runningTasksByExecutors(): Map[String, Int] = synchronized {
    +    executorIdToRunningTaskIds.toMap.mapValues(_.size)
    --- End diff --
    
    We need this to convert from a mutable to immutable map.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to