viirya commented on a change in pull request #26461: [SPARK-29831][SQL] Scan
Hive partitioned table should not dramatically increase data parallelism
URL: https://github.com/apache/spark/pull/26461#discussion_r344873800
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala
##########
@@ -155,6 +155,16 @@ private[spark] object HiveUtils extends Logging {
.booleanConf
.createWithDefault(true)
+ val HIVE_TABLE_SCAN_MAX_PARALLELISM =
buildConf("spark.sql.hive.tableScan.maxParallelism")
+ .doc("When reading Hive partitioned table, the default parallelism is the
sum of Hive " +
+ "partition RDDs' parallelism. For Hive table of many partitions with
many files, " +
+ "the parallelism could be very big and not good for Spark job
scheduling. This optional " +
+ "config can set a maximum parallelism for reading Hive partitioned
table. If the result " +
+ "RDD of reading such table is larger than this value, Spark will reduce
the partition " +
+ "number by doing a coalesce on the RDD.")
+ .intConf
+ .createOptional
Review comment:
The reason I leave it optional is to allow us keep current behavior.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]