Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/19041#discussion_r155381360
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
---
@@ -320,15 +326,16 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
case Some(executorInfo) =>
// This must be synchronized because variables mutated
// in this block are read when requesting executors
- val killed = CoarseGrainedSchedulerBackend.this.synchronized {
+ val removeStatus =
CoarseGrainedSchedulerBackend.this.synchronized {
addressToExecutorId -= executorInfo.executorAddress
executorDataMap -= executorId
executorsPendingLossReason -= executorId
- executorsPendingToRemove.remove(executorId).getOrElse(false)
+ executorsPendingToRemove.remove(executorId).getOrElse(Died)
}
totalCoreCount.addAndGet(-executorInfo.totalCores)
totalRegisteredExecutors.addAndGet(-1)
- scheduler.executorLost(executorId, if (killed) ExecutorKilled
else reason)
+ scheduler.executorLost(executorId,
+ if (removeStatus == KilledByDriver)
ExecutorKilled else reason)
--- End diff --
nit: indentation
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]