Github user mgummelt commented on a diff in the pull request:
https://github.com/apache/spark/pull/10993#discussion_r51652632
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/CoarseMesosSchedulerBackend.scala
---
@@ -426,23 +489,23 @@ private[spark] class CoarseMesosSchedulerBackend(
override def doKillExecutors(executorIds: Seq[String]): Boolean = {
if (mesosDriver == null) {
logWarning("Asked to kill executors before the Mesos driver was
started.")
- return false
- }
-
- val slaveIdToTaskId = taskIdToSlaveId.inverse()
- for (executorId <- executorIds) {
- val slaveId = executorId.split("/")(0)
- if (slaveIdToTaskId.containsKey(slaveId)) {
- mesosDriver.killTask(
-
TaskID.newBuilder().setValue(slaveIdToTaskId.get(slaveId).toString).build())
- pendingRemovedSlaveIds += slaveId
- } else {
- logWarning("Unable to find executor Id '" + executorId + "' in
Mesos scheduler")
+ false
+ } else {
+ for (executorId <- executorIds) {
+ val taskId = TaskID.newBuilder().setValue(executorId).build()
+ mesosDriver.killTask(taskId)
}
+ // no need to adjust `executorLimitOption` since the
AllocationManager already communicated
+ // the desired limit through a call to `doRequestTotalExecutors`.
+ // See
[[o.a.s.scheduler.cluster.CoarseGrainedSchedulerBackend.killExecutors]]
+ true
}
- // no need to adjust `executorLimitOption` since the AllocationManager
already communicated
- // the desired limit through a call to `doRequestTotalExecutors`.
- // See
[[o.a.s.scheduler.cluster.CoarseGrainedSchedulerBackend.killExecutors]]
- true
}
}
+
+private class Slave(val hostname: String) {
+ var taskFailures = 0
+ val taskIDs = new HashSet[String]()
+ var pendingRemoval = false
--- End diff --
removed
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]