Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/19464#discussion_r144030646
--- Diff: core/src/main/scala/org/apache/spark/rdd/HadoopRDD.scala ---
@@ -196,7 +196,10 @@ class HadoopRDD[K, V](
// add the credentials here as this can be called before SparkContext
initialized
SparkHadoopUtil.get.addCredentials(jobConf)
val inputFormat = getInputFormat(jobConf)
- val inputSplits = inputFormat.getSplits(jobConf, minPartitions)
+ var inputSplits = inputFormat.getSplits(jobConf, minPartitions)
+ if
(sparkContext.getConf.getBoolean("spark.hadoop.filterOutEmptySplit", false)) {
+ inputSplits = inputSplits.filter(_.getLength>0)
--- End diff --
nit: extra space around operator.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]