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

    https://github.com/apache/spark/pull/4050#discussion_r22985033
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala ---
    @@ -219,6 +220,9 @@ class HadoopRDD[K, V](
           val bytesReadCallback = if 
(split.inputSplit.value.isInstanceOf[FileSplit]) {
             SparkHadoopUtil.get.getFSBytesReadOnThreadCallback(
               split.inputSplit.value.asInstanceOf[FileSplit].getPath, jobConf)
    +      } else if (split.inputSplit.value.isInstanceOf[CombineFileSplit]) {
    +        SparkHadoopUtil.get.getFSBytesReadOnThreadCallback(
    +          
split.inputSplit.value.asInstanceOf[CombineFileSplit].getPath(0), jobConf)
    --- End diff --
    
    Yes, SparkHadoopUtil) can check for those classes. It can have a matcher on 
the 4 classes (2 new and 2 old). So the call from hadoopRdd would be something 
like:
    SparkHadoopUtil.get.getFSBytesReadOnThreadCallback(split.inputSplit, 
jobConf)
    Not a big deal i guess since in SparkHadoopUtil you'll have four cases but 
at least that logic is centralized.



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

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

Reply via email to