Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/8887#discussion_r41936884
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
@@ -781,6 +781,23 @@ private[spark] class TaskSetManager(
sortedTaskSetQueue
}
+ /**
+ * Called by TaskScheduler when an executor is lost, but the reason is
not yet known. This method
+ * does not fail any tasks related to the executor. Instead, tasks are
left as is, but the
+ * executor is removed from the list of live executors, so no new tasks
are scheduled. Pending
+ * tasks for the executor are re-queued.
+ */
+ override def disableExecutor(execId: String, host: String): Unit = {
+ for (index <- getPendingTasksForExecutor(execId)) {
+ addPendingTask(index, readding = true)
+ }
+ for (index <- getPendingTasksForHost(host)) {
+ addPendingTask(index, readding = true)
+ }
+ // recalculate valid locality levels and waits when executor is
disabled.
+ recomputeLocality()
--- End diff --
It seems to not be expensive; looks `O(1)` except in rare cases where most
executors with pending tasks are dead, in which case it would be `O(number
executors)`.
---
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]