Github user brad-kaiser commented on a diff in the pull request:
https://github.com/apache/spark/pull/19041#discussion_r155043439
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
---
@@ -646,18 +648,14 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
Future.successful(true)
}
- val killExecutors: Boolean => Future[Boolean] =
- if (!executorsToKill.isEmpty) {
- _ => doKillExecutors(executorsToKill)
- } else {
- _ => Future.successful(false)
- }
-
- val killResponse =
adjustTotalExecutors.flatMap(killExecutors)(ThreadUtils.sameThread)
+ val killResponse = if (executorsToKill.nonEmpty) {
+ adjustTotalExecutors.flatMap(_ =>
doKillExecutors(executorsToKill))(ThreadUtils.sameThread)
--- End diff --
fixed
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]