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

    https://github.com/apache/spark/pull/10835#discussion_r50895675
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -1125,24 +1130,31 @@ class DAGScheduler(
           event.taskInfo.attemptNumber, // this is a task attempt number
           event.reason)
     
    -    // The success case is dealt with separately below, since we need to 
compute accumulator
    -    // updates before posting.
    -    if (event.reason != Success) {
    -      val attemptId = task.stageAttemptId
    -      listenerBus.post(SparkListenerTaskEnd(stageId, attemptId, taskType, 
event.reason,
    -        event.taskInfo, event.taskMetrics))
    -    }
    +    // Reconstruct task metrics. Note: this may be null if the task has 
failed.
    +    val taskMetrics: TaskMetrics =
    +      if (event.accumUpdates.nonEmpty) {
    +        try {
    +          TaskMetrics.fromAccumulatorUpdates(event.accumUpdates)
    +        } catch {
    +          case NonFatal(e) =>
    +            logError(s"Error when attempting to reconstruct metrics for 
task $taskId", e)
    +            null
    +        }
    +      } else {
    +        null
    +      }
     
         if (!stageIdToStage.contains(task.stageId)) {
           // Skip all the actions if the stage has been cancelled.
           return
         }
     
    +    listenerBus.post(SparkListenerTaskEnd(
    --- End diff --
    
    actually, it's failing tests now and I don't know why. For simplicity I'm 
just going to revert this change and add a comment that the old comment was 
wrong.


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