LuciferYang commented on a change in pull request #34792:
URL: https://github.com/apache/spark/pull/34792#discussion_r761787184
##########
File path: core/src/main/scala/org/apache/spark/rdd/NewHadoopRDD.scala
##########
@@ -123,6 +123,10 @@ class NewHadoopRDD[K, V](
override def getPartitions: Array[Partition] = {
val inputFormat = inputFormatClass.getConstructor().newInstance()
+ // setMinPartitions below will call FileInputFormat.listStatus(), which
can be quite slow when
+ // traversing a large number of directories and files. Parallelize it.
+ _conf.setIfUnset(FileInputFormat.LIST_STATUS_NUM_THREADS,
+ Runtime.getRuntime.availableProcessors().toString)
Review comment:
Will this `availableProcessors` get the actual number of available CPU
cores in container instances, VM instances and physical machine instances?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]