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

    https://github.com/apache/spark/pull/962#discussion_r14314923
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala ---
    @@ -196,6 +197,17 @@ class HadoopRDD[K, V](
           context.addOnCompleteCallback{ () => closeIfNeeded() }
           val key: K = reader.createKey()
           val value: V = reader.createValue()
    +
    +      // Set the task input metrics.
    +      val inputMetrics = new InputMetrics(DataReadMethod.Hadoop)
    +      try {
    +        inputMetrics.bytesRead = split.inputSplit.value.getLength()
    --- End diff --
    
    This won't be the exact size of the data read. As split boundaries aren't 
always at record boundaries, tasks may need to read into other splits to 
complete a record.  Not a big deal in most cases, but might be worth a comment 
or note in the documentation.


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

Reply via email to