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

    https://github.com/apache/spark/pull/18707#discussion_r131702074
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala 
---
    @@ -131,17 +131,17 @@ class ExecutorsListener(storageStatusListener: 
StorageStatusListener, conf: Spar
         if (info != null) {
           val eid = info.executorId
           val taskSummary = executorToTaskSummary.getOrElseUpdate(eid, 
ExecutorTaskSummary(eid))
    -      taskEnd.reason match {
    -        case Resubmitted =>
    -          // Note: For resubmitted tasks, we continue to use the metrics 
that belong to the
    -          // first attempt of this task. This may not be 100% accurate 
because the first attempt
    -          // could have failed half-way through. The correct fix would be 
to keep track of the
    -          // metrics added by each attempt, but this is much more 
complicated.
    -          return
    -        case _: ExceptionFailure =>
    -          taskSummary.tasksFailed += 1
    -        case _ =>
    -          taskSummary.tasksComplete += 1
    +      // Note: For resubmitted tasks, we continue to use the metrics that 
belong to the
    +      // first attempt of this task. This may not be 100% accurate because 
the first attempt
    +      // could have failed half-way through. The correct fix would be to 
keep track of the
    +      // metrics added by each attempt, but this is much more complicated.
    +      if (taskEnd.reason == Resubmitted) {
    +        return
    +      }
    +      if (info.successful) {
    --- End diff --
    
    def successful: Boolean = finished && !failed && !killed
    
    So if  the task state shows finished and it has neither failed nor been 
killed, then info.successful is true. Now, there could be multiple reasons for 
a failed or killed task, and taskEnd.reason lists those. However, if task state 
is SUCCESS, so is the reason and thus, info.successful will be true in case of 
SUCCESS and false for all the other cases.


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

Reply via email to