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

    https://github.com/apache/spark/pull/19464#discussion_r144235417
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/NewHadoopRDD.scala ---
    @@ -122,7 +122,10 @@ class NewHadoopRDD[K, V](
           case _ =>
         }
         val jobContext = new JobContextImpl(_conf, jobId)
    -    val rawSplits = inputFormat.getSplits(jobContext).toArray
    +    var rawSplits = 
inputFormat.getSplits(jobContext).toArray(Array.empty[InputSplit])
    +    if 
(sparkContext.getConf.getBoolean("spark.hadoop.filterOutEmptySplit", false)) {
    +      rawSplits = rawSplits.filter(_.getLength>0)
    --- End diff --
    
    Is there any one use empty file to do something ?
    for example:
    sc.textFile("/somepath/*").mapPartitions(....)
    setting this flag to true by default may change the behavior of user's 
application.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to