rdblue commented on a change in pull request #31451:
URL: https://github.com/apache/spark/pull/31451#discussion_r569778168



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/ContinuousScanExec.scala
##########
@@ -47,6 +47,16 @@ case class ContinuousScanExec(
     stream.createContinuousReaderFactory()
   }
 
+  /**
+   * The callback function which is called when the output iterator of input 
RDD is consumed
+   * completely.
+   */
+  private def onOutputCompletion(reader: PartitionReader[_]) = {
+    reader.getCustomMetrics.foreach { metric =>
+      longMetric(metric.getName) += metric.getValue
+    }

Review comment:
       Should we also have a way to set task input metrics? Maybe a reserved 
metric name like `input-bytes` that will set 
`TaskContext.get().taskMetrics().inputMetrics.bytesRead`. Records read would be 
really useful as well.




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