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

    https://github.com/apache/spark/pull/2087#discussion_r19259854
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala ---
    @@ -244,12 +243,35 @@ class HadoopRDD[K, V](
               case eof: EOFException =>
                 finished = true
             }
    +
    +        // Update bytes read metric every few records
    +        if (recordsSinceMetricsUpdate == 
HadoopRDD.RECORDS_BETWEEN_BYTES_READ_METRIC_UPDATES
    +            && bytesReadCallback.isDefined) {
    +          recordsSinceMetricsUpdate = 0
    +          val bytesReadFn = bytesReadCallback.get
    +          inputMetrics.bytesRead = bytesReadFn()
    +        } else {
    +          recordsSinceMetricsUpdate += 1
    +        }
             (key, value)
           }
     
           override def close() {
             try {
               reader.close()
    +          if (bytesReadCallback.isDefined) {
    +            inputMetrics.bytesRead = bytesReadCallback.get()
    --- End diff --
    
    can you change this invocation to use the correct style as well?


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