jerryshao commented on a change in pull request #23560: [SPARK-26632][Spark 
Core] Separate Thread Configurations of Driver and Executor
URL: https://github.com/apache/spark/pull/23560#discussion_r251327361
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/network/netty/SparkTransportConf.scala
 ##########
 @@ -44,8 +44,11 @@ object SparkTransportConf {
     // assuming we have all the machine's cores).
     // NB: Only set if serverThreads/clientThreads not already set.
     val numThreads = NettyUtils.defaultNumThreads(numUsableCores)
-    conf.setIfMissing(s"spark.$module.io.serverThreads", numThreads.toString)
-    conf.setIfMissing(s"spark.$module.io.clientThreads", numThreads.toString)
+    val finalServerNumThreads = getNumOfThreads(conf, module, true, numThreads)
+    val finalClientNumThreads = getNumOfThreads(conf, module, false, 
numThreads)
+
+    conf.setIfMissing(s"spark.$module.io.serverThreads", finalServerNumThreads)
 
 Review comment:
   From my understanding, if `spark.$module.io.serverThreads` is configured, 
`finalServerNumThreads` will not take effect, since the config is only set if 
missing `setIfMissing`. Please correct me if I'm wrong.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]

Reply via email to