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

    https://github.com/apache/spark/pull/12472#discussion_r60175818
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/TaskMetrics.scala 
---
    @@ -217,21 +170,45 @@ class TaskMetrics private[spark] (initialAccums: 
Seq[Accumulator[_]]) extends Se
        */
       private[spark] def mergeShuffleReadMetrics(): Unit = synchronized {
         if (tempShuffleReadMetrics.nonEmpty) {
    -      _shuffleReadMetrics.setMergeValues(tempShuffleReadMetrics)
    +      shuffleReadMetrics.setMergeValues(tempShuffleReadMetrics)
         }
       }
     
    -  /**
    -   * Metrics related to shuffle write, defined only in shuffle map stages.
    -   */
    -  def shuffleWriteMetrics: ShuffleWriteMetrics = _shuffleWriteMetrics
    +  // Only used for test
    +  private[spark] val testAccum =
    +    sys.props.get("spark.testing").map(_ => 
TaskMetrics.createAccum[Long](TEST_ACCUM))
    +
    +  @transient private[spark] lazy val internalAccums: Seq[Accumulable[_, 
_]] = {
    --- End diff --
    
    we collect these internal accumulators together, so that it's easier to:
    
    1. register all of them in scheduler.
    2. get the internal accumulator info out of given accumulator updates in 
`TaskMetrics.fromAccumulatorUpdates`


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