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

    https://github.com/apache/spark/pull/10835#discussion_r50767528
  
    --- Diff: 
core/src/main/scala/org/apache/spark/executor/ShuffleReadMetrics.scala ---
    @@ -17,71 +17,102 @@
     
     package org.apache.spark.executor
     
    +import org.apache.spark.{Accumulator, InternalAccumulator}
     import org.apache.spark.annotation.DeveloperApi
     
     
     /**
      * :: DeveloperApi ::
    - * Metrics pertaining to shuffle data read in a given task.
    + * A collection of accumulators that represent metrics about reading 
shuffle data.
      */
     @DeveloperApi
    -class ShuffleReadMetrics extends Serializable {
    +class ShuffleReadMetrics private (
    +    _remoteBlocksFetched: Accumulator[Int],
    +    _localBlocksFetched: Accumulator[Int],
    +    _remoteBytesRead: Accumulator[Long],
    +    _localBytesRead: Accumulator[Long],
    +    _fetchWaitTime: Accumulator[Long],
    +    _recordsRead: Accumulator[Long])
    +  extends Serializable {
    +
    +  private[executor] def this(accumMap: Map[String, Accumulator[_]]) {
    +    this(
    +      TaskMetrics.getAccum[Int](accumMap, 
InternalAccumulator.shuffleRead.REMOTE_BLOCKS_FETCHED),
    --- End diff --
    
    turns out it didn't. I added new tests to cover that.


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