You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/10 09:03:35 UTC

[GitHub] [spark] ulysses-you commented on a change in pull request #28778: [SPARK-31949][SQL] Add spark.default.parallelism in SQLConf for isolated across session

ulysses-you commented on a change in pull request #28778:
URL: https://github.com/apache/spark/pull/28778#discussion_r437973536



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
##########
@@ -180,6 +180,15 @@ class SparkSession private(
    */
   @transient lazy val conf: RuntimeConfig = new RuntimeConfig(sessionState.conf)
 
+  /**
+   * Same as `spark.default.parallelism`, can be isolated across sessions.
+   *
+   * @since 3.1.0
+   */
+  def defaultParallelism: Int = {
+    sessionState.conf.defaultParallelism.getOrElse(sparkContext.defaultParallelism)

Review comment:
       As I said above. If add this config, I will move the exists `defaultParallelism` which in sql module follow up. e.g. [FilePartition.maxSplitBytes()](https://github.com/apache/spark/blob/82ff29be7afa2ff6350310ab9bdf6b474398fdc1/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FilePartition.scala#L91)




----------------------------------------------------------------
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:
users@infra.apache.org



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