Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/962#discussion_r14315071
--- 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 --
Ah thanks @sryza. I had previously used Record Reader's getPos() method to
get the size. It looks like that was removed in the new API but we can use
that for the old-style Hadoop RDDs; would that be better?
---
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.
---