spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayousterhout <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-1683] Track task read metrics.
Date Wed, 25 Jun 2014 22:05:39 GMT
Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/962#discussion_r14215260
  
    --- Diff: core/src/test/scala/org/apache/spark/util/JsonProtocolSuite.scala ---
    @@ -468,15 +498,23 @@ class JsonProtocolSuite extends FunSuite {
         t.jvmGCTime = d
         t.resultSerializationTime = a + b
         t.memoryBytesSpilled = a + c
    -    sr.shuffleFinishTime = b + c
    -    sr.totalBlocksFetched = e + f
    -    sr.remoteBytesRead = b + d
    -    sr.localBlocksFetched = e
    -    sr.fetchWaitTime = a + d
    -    sr.remoteBlocksFetched = f
    +
    +    if (hasHdfsInput) {
    +      val inputMetrics = new InputMetrics(DataReadMethod.Hdfs)
    +      inputMetrics.bytesRead = d + e + f
    +      t.inputMetrics = Some(inputMetrics)
    +    } else {
    +      val sr = new ShuffleReadMetrics
    +      sr.shuffleFinishTime = b + c
    +      sr.totalBlocksFetched = e + f
    +      sr.remoteBytesRead = b + d
    +      sr.localBlocksFetched = e
    +      sr.fetchWaitTime = a + d
    +      sr.remoteBlocksFetched = f
    +      t.shuffleReadMetrics = Some(sr)
    +    }
    --- End diff --
    
    I thought it would be good to test the case where one of them isn't set (which is also
representative of the reality -- I think always only one of them will be set).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message