Github user vanzin commented on a diff in the pull request: https://github.com/apache/spark/pull/14926#discussion_r79037417 --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala --- @@ -1575,13 +1581,14 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli * @return whether the request is received. */ private[spark] def killAndReplaceExecutor(executorId: String): Boolean = { - schedulerBackend match { + val killResponse = schedulerBackend match { case b: CoarseGrainedSchedulerBackend => b.killExecutors(Seq(executorId), replace = true, force = true) case _ => logWarning("Killing executors is only supported in coarse-grained mode") - false + Seq.empty[String] } + killResponse.nonEmpty --- End diff -- You could move the `nonEmpty` to the `killExecutors` call above and not have to change anything else in this method.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org