Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12899#discussion_r62410420
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/Task.scala ---
    @@ -155,7 +155,13 @@ private[spark] abstract class Task[T](
        */
       def collectAccumulatorUpdates(taskFailed: Boolean = false): 
Seq[AccumulatorV2[_, _]] = {
         if (context != null) {
    -      context.taskMetrics.accumulators().filter { a => !taskFailed || 
a.countFailedValues }
    +      context.taskMetrics.internalAccums.filter { a =>
    +        // RESULT_SIZE accumulator is always zero at executor, we need to 
send it back as its
    +        // value will be updated at driver side.
    +        !a.isZero || a.name == Some(InternalAccumulator.RESULT_SIZE)
    +      // zero value external accumulators may still be useful, e.g. 
SQLMetrics, we should not filter
    --- End diff --
    
    There are 2 concepts:
    
    1. internal accumulators: like GCtime, resultSize, which are internal to 
DAGScheduler.
    2. `countFailedValues` accumulator: `countFailedValues` is an internal flag 
that can only be set by us. All internal accumulators are `countFailedValues` 
accumulators, and SQLMetrics are also `countFailedValues` accumulators.


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