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

    https://github.com/apache/spark/pull/4067#discussion_r24132929
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala 
---
    @@ -1089,17 +1091,15 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
       private def initHadoopOutputMetrics(context: TaskContext): 
(OutputMetrics, Option[() => Long]) = {
         val bytesWrittenCallback = 
SparkHadoopUtil.get.getFSBytesWrittenOnThreadCallback()
         val outputMetrics = new OutputMetrics(DataWriteMethod.Hadoop)
    -    if (bytesWrittenCallback.isDefined) {
    -      context.taskMetrics.outputMetrics = Some(outputMetrics)
    --- End diff --
    
    I think there might be an issue with including OutputMetrics for older 
Hadoop versions. Based on the way output metrics were implemented in #2968 (/cc 
@sryza), this won't correctly display the output file size (it will show up as 
zero) for older versions of Hadoop. If you look, for input metrics, we look at 
the file size with older hadoop versions, but unfortunately I don't think the 
same thing was added for output metrics. It might be good to add that, in the 
case where the `FileOutputFormat` is in use.


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