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

    https://github.com/apache/spark/pull/22288#discussion_r224873268
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/BlacklistTracker.scala ---
    @@ -146,21 +146,31 @@ private[scheduler] class BlacklistTracker (
         nextExpiryTime = math.min(execMinExpiry, nodeMinExpiry)
       }
     
    +  private def killExecutor(exec: String, msg: String): Unit = {
    +    allocationClient match {
    +      case Some(a) =>
    +        logInfo(msg)
    +        a.killExecutors(Seq(exec), adjustTargetNumExecutors = false, 
countFailures = false,
    +          force = true)
    +      case None =>
    +        logInfo(s"Not attempting to kill blacklisted executor id $exec " +
    +          s"since allocation client is not defined.")
    +    }
    +  }
    +
       private def killBlacklistedExecutor(exec: String): Unit = {
         if (conf.get(config.BLACKLIST_KILL_ENABLED)) {
    -      allocationClient match {
    -        case Some(a) =>
    -          logInfo(s"Killing blacklisted executor id $exec " +
    -            s"since ${config.BLACKLIST_KILL_ENABLED.key} is set.")
    -          a.killExecutors(Seq(exec), adjustTargetNumExecutors = false, 
countFailures = false,
    -            force = true)
    -        case None =>
    -          logWarning(s"Not attempting to kill blacklisted executor id 
$exec " +
    -            s"since allocation client is not defined.")
    -      }
    +      killExecutor(exec,
    +        s"Killing blacklisted executor id $exec since 
${config.BLACKLIST_KILL_ENABLED.key} is set.")
         }
       }
     
    +  private[scheduler] def killBlacklistedIdleExecutor(exec: String): Unit = 
{
    +    killExecutor(exec,
    --- End diff --
    
    We want to kill an idle executor which is completely blacklisted without 
having to enable killing for all the blacklisted executors, so we made the 
change otherwise we would have kept it as is.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to