Github user squito commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14079#discussion_r70890594
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala ---
    @@ -800,6 +827,75 @@ private[spark] class TaskSetManager(
         maybeFinishTaskSet()
       }
     
    +  private[scheduler] def updateBlacklistForFailedTask(
    +      host: String,
    +      exec: String,
    +      index: Int): Unit = {
    +    val failureStatus = execToFailures.getOrElseUpdate(exec, new 
FailureStatus())
    +    failureStatus.totalFailures += 1
    +    failureStatus.tasksWithFailures += index
    +
    +    // check if this task has also failed on other executors on the same 
host, and if so, blacklist
    +    // this task from the host
    +    val failuresOnHost = (for {
    +      exec <- sched.getExecutorsAliveOnHost(host).getOrElse(Set()).toSeq
    +      failures <- execToFailures.get(exec)
    +    } yield {
    +      if (failures.tasksWithFailures.contains(index)) 1 else 0
    +    }).sum
    +    if (failuresOnHost >= MAX_TASK_FAILURES_PER_NODE) {
    +      nodeBlacklistedTasks.getOrElseUpdate(host, new HashSet()) += index
    +    }
    +
    +    if (failureStatus.totalFailures >= MAX_FAILURES_PER_EXEC_STAGE) {
    +      // This executor has been pushed into the blacklist for this stage.  
Let's check if it pushes
    +      // the whole node into the blacklist
    +      val blacklistedExecutors =
    +        execToFailures.filter(_._2.totalFailures >= 
MAX_FAILURES_PER_EXEC_STAGE)
    +      if (blacklistedExecutors.size >= MAX_FAILED_EXEC_PER_NODE_STAGE) {
    --- End diff --
    
    good point, I updated it.


---
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

Reply via email to