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

    https://github.com/apache/spark/pull/1507#discussion_r15796125
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/TaskMetrics.scala 
---
    @@ -98,19 +105,22 @@ class TaskMetrics extends Serializable {
        */
       var updatedBlocks: Option[Seq[(BlockId, BlockStatus)]] = None
     
    -  /** Adds the given ShuffleReadMetrics to any existing shuffle metrics 
for this task. */
    -  def updateShuffleReadMetrics(newMetrics: ShuffleReadMetrics) = 
synchronized {
    -    _shuffleReadMetrics match {
    -      case Some(existingMetrics) =>
    -        existingMetrics.shuffleFinishTime = math.max(
    -          existingMetrics.shuffleFinishTime, newMetrics.shuffleFinishTime)
    -        existingMetrics.fetchWaitTime += newMetrics.fetchWaitTime
    -        existingMetrics.localBlocksFetched += newMetrics.localBlocksFetched
    -        existingMetrics.remoteBlocksFetched += 
newMetrics.remoteBlocksFetched
    -        existingMetrics.remoteBytesRead += newMetrics.remoteBytesRead
    -      case None =>
    -        _shuffleReadMetrics = Some(newMetrics)
    +  def createShuffleReadMetricsForDependency(): ShuffleReadMetrics = 
synchronized {
    +    val readMetrics = new ShuffleReadMetrics()
    +    depsShuffleReadMetrics += readMetrics
    +    readMetrics
    +  }
    +
    +  def mergeShuffleReadMetrics() = synchronized {
    --- End diff --
    
    Could you add a brief comment on what this does? (and when this happens)


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