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

    https://github.com/apache/spark/pull/14969#discussion_r78223186
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala 
---
    @@ -108,31 +143,33 @@ class ExecutorsListener(storageStatusListener: 
StorageStatusListener, conf: Spar
               // metrics added by each attempt, but this is much more 
complicated.
               return
             case e: ExceptionFailure =>
    -          executorToTasksFailed(eid) = 
executorToTasksFailed.getOrElse(eid, 0) + 1
    +          executorToTaskSummary(eid).tasksFailed = 
executorToTaskSummary(eid).tasksFailed + 1
             case _ =>
    -          executorToTasksComplete(eid) = 
executorToTasksComplete.getOrElse(eid, 0) + 1
    +          executorToTaskSummary(eid).tasksComplete = 
executorToTaskSummary(eid).tasksComplete + 1
           }
    -
    -      executorToTasksActive(eid) = executorToTasksActive.getOrElse(eid, 1) 
- 1
    -      executorToDuration(eid) = executorToDuration.getOrElse(eid, 0L) + 
info.duration
    +      if (executorToTaskSummary(eid).tasksActive >= 1) {
    +        executorToTaskSummary(eid).tasksActive = 
executorToTaskSummary(eid).tasksActive - 1
    +      }
    +      executorToTaskSummary(eid).duration = 
executorToTaskSummary(eid).duration + info.duration
     
           // Update shuffle read/write
           val metrics = taskEnd.taskMetrics
           if (metrics != null) {
    -        executorToInputBytes(eid) =
    -          executorToInputBytes.getOrElse(eid, 0L) + 
metrics.inputMetrics.bytesRead
    -        executorToInputRecords(eid) =
    -          executorToInputRecords.getOrElse(eid, 0L) + 
metrics.inputMetrics.recordsRead
    -        executorToOutputBytes(eid) =
    -          executorToOutputBytes.getOrElse(eid, 0L) + 
metrics.outputMetrics.bytesWritten
    -        executorToOutputRecords(eid) =
    -          executorToOutputRecords.getOrElse(eid, 0L) + 
metrics.outputMetrics.recordsWritten
    -
    -        executorToShuffleRead(eid) =
    -          executorToShuffleRead.getOrElse(eid, 0L) + 
metrics.shuffleReadMetrics.remoteBytesRead
    -        executorToShuffleWrite(eid) =
    -          executorToShuffleWrite.getOrElse(eid, 0L) + 
metrics.shuffleWriteMetrics.bytesWritten
    -        executorToJvmGCTime(eid) = executorToJvmGCTime.getOrElse(eid, 0L) 
+ metrics.jvmGCTime
    +        executorToTaskSummary(eid).inputBytes =
    --- End diff --
    
    Also, don't you want to just retrieve executorToTaskSummary(eid) and mutate 
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 [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