Github user yinxusen commented on a diff in the pull request: https://github.com/apache/spark/pull/376#discussion_r11470220 --- Diff: core/src/main/scala/org/apache/spark/input/WholeTextFileInputFormat.scala --- @@ -44,4 +47,15 @@ private[spark] class WholeTextFileInputFormat extends CombineFileInputFormat[Str context, classOf[WholeTextFileRecordReader]) } + + /** + * Allow minSplits set by end-user in order to keep compatibility with old Hadoop API. + */ + def setMaxSplitSize(context: JobContext, minSplits: Int) { + val files = listStatus(context) + val totalLen = files.map { file => + if (file.isDir) 0L else file.getLen + }.sum + super.setMaxSplitSize(totalLen / (if (minSplits == 0) 1 else minSplits)) --- End diff -- For example, `FileInputForrmat` uses `mapred.max.split.szie` and `getMaxSplitSize()`, while `CombineFileInputFormat` use `mapreduce.input.fileinputformat.split.max.size` and `setMaxSplitSize()`.
--- 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. ---