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

 ##########
 File path: 
core/src/main/scala/org/apache/spark/network/netty/SparkTransportConf.scala
 ##########
 @@ -36,16 +36,30 @@ object SparkTransportConf {
    * @param numUsableCores if nonzero, this will restrict the server and 
client threads to only
    *                       use the given number of cores, rather than all of 
the machine's cores.
    *                       This restriction will only occur if these 
properties are not already set.
+   * @param role           optional role, could be driver, executor, worker 
and master. Default is
+   *                      [[None]], means no role specific configurations.
    */
-  def fromSparkConf(_conf: SparkConf, module: String, numUsableCores: Int = 
0): TransportConf = {
+  def fromSparkConf(
+      _conf: SparkConf,
+      module: String,
+      numUsableCores: Int = 0,
+      role: Option[String] = None): TransportConf = {
     val conf = _conf.clone
-
-    // Specify thread configuration based on our JVM's allocation of cores 
(rather than necessarily
-    // assuming we have all the machine's cores).
-    // NB: Only set if serverThreads/clientThreads not already set.
+    // specify default thread configuration based on our JVM's allocation of 
cores (rather than
+    // necessarily assuming we have all the machine's cores).
     val numThreads = NettyUtils.defaultNumThreads(numUsableCores)
-    conf.setIfMissing(s"spark.$module.io.serverThreads", numThreads.toString)
-    conf.setIfMissing(s"spark.$module.io.clientThreads", numThreads.toString)
+    // module threads configuration
+    val (modServerThreads, modClientThreads) =
 
 Review comment:
   ok, let me try

----------------------------------------------------------------
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]

Reply via email to