viirya commented on a change in pull request #29441:
URL: https://github.com/apache/spark/pull/29441#discussion_r471041575



##########
File path: core/src/main/scala/org/apache/spark/rdd/RDD.scala
##########
@@ -388,11 +388,9 @@ abstract class RDD[T: ClassTag](
       // Block hit.
       case Left(blockResult) =>
         if (readCachedBlock) {
-          val existingMetrics = context.taskMetrics().inputMetrics
-          existingMetrics.incBytesRead(blockResult.bytes)

Review comment:
       Why? Based on `TaskMetrics.inputMetrics` document, it is
   
   > Metrics related to reading data from a [[org.apache.spark.rdd.HadoopRDD]] 
or from persisted data, defined only in tasks with input.
   
   Even cached, don't we need to include its size into input size of the task?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to