Github user kayousterhout commented on a diff in the pull request: https://github.com/apache/spark/pull/14079#discussion_r77279202 --- Diff: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala --- @@ -800,6 +842,86 @@ private[spark] class TaskSetManager( maybeFinishTaskSet() } + private[scheduler] def updateBlacklistForFailedTask( + host: String, + exec: String, + index: Int): Unit = { + val execFailures = execToFailures.getOrElseUpdate(exec, new ExecutorFailuresInTaskSet(host)) + execFailures.updateWithFailure(index, clock.getTimeMillis() + + blacklistTracker.get.BLACKLIST_TIMEOUT_MILLIS) + + // check if this task has also failed on other executors on the same host -- if its gone + // over the limit, blacklist it from the entire host + val execsWithFailuresOnNode = nodeToExecsWithFailures.getOrElseUpdate(host, new HashSet()) + execsWithFailuresOnNode += exec + val failuresOnHost = execsWithFailuresOnNode.toIterator.map { exec => + execToFailures.get(exec).map { failures => --- End diff -- make this a flatMap to avoid the getOrElse below?
--- 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