Github user brad-kaiser commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19041#discussion_r139223199
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
 ---
    @@ -612,25 +623,26 @@ class CoarseGrainedSchedulerBackend(scheduler: 
TaskSchedulerImpl, val rpcEnv: Rp
           force: Boolean): Seq[String] = {
         logInfo(s"Requesting to kill executor(s) ${executorIds.mkString(", 
")}")
     
    -    val response = synchronized {
    +    val response: Future[Seq[String]] = synchronized {
           val (knownExecutors, unknownExecutors) = 
executorIds.partition(executorDataMap.contains)
    -      unknownExecutors.foreach { id =>
    -        logWarning(s"Executor to kill $id does not exist!")
    -      }
    +      unknownExecutors.foreach(id => logWarning(s"Executor to kill $id 
does not exist!"))
     
           // If an executor is already pending to be removed, do not kill it 
again (SPARK-9795)
           // If this executor is busy, do not kill it unless we are told to 
force kill it (SPARK-9552)
           val executorsToKill = knownExecutors
    -        .filter { id => !executorsPendingToRemove.contains(id) }
    -        .filter { id => force || !scheduler.isExecutorBusy(id) }
    -      executorsToKill.foreach { id => executorsPendingToRemove(id) = 
!replace }
    +        .filter(id => !executorsPendingToRemove.contains(id))
    --- End diff --
    
    reverted


---

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

Reply via email to