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

    https://github.com/apache/spark/pull/2533#discussion_r18122075
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
 ---
    @@ -104,13 +96,15 @@ class CoarseGrainedSchedulerBackend(scheduler: 
TaskSchedulerImpl, actorSystem: A
           case StatusUpdate(executorId, taskId, state, data) =>
             scheduler.statusUpdate(taskId, state, data.value)
             if (TaskState.isFinished(state)) {
    -          if (executorActor.contains(executorId)) {
    -            freeCores(executorId) += scheduler.CPUS_PER_TASK
    -            makeOffers(executorId)
    -          } else {
    -            // Ignoring the update since we don't know about the executor.
    -            val msg = "Ignored task status update (%d state %s) from 
unknown executor %s with ID %s"
    -            logWarning(msg.format(taskId, state, sender, executorId))
    +          executorDataMap.get(executorId) match {
    +            case Some(executorInfo) =>
    +              executorInfo.freeCores += scheduler.CPUS_PER_TASK
    +              makeOffers(executorId)
    +            case None =>
    +              // Ignoring the update since we don't know about the 
executor.
    +              val msg = "Ignored task status update (%d state %s) " +
    --- End diff --
    
    Not your code, but you probably don't need to put this in a val either


---
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