vanzin 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_r279467951
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/rpc/netty/NettyRpcEnv.scala
 ##########
 @@ -47,11 +48,21 @@ private[netty] class NettyRpcEnv(
     host: String,
     securityManager: SecurityManager,
     numUsableCores: Int) extends RpcEnv(conf) with Logging {
+  // try to get specific threads configurations of driver and executor
+  val executorId = conf.get(EXECUTOR_ID).getOrElse("")
+  // neither driver nor executor if executor id is not set
+  val role = executorId match {
+    case "" => None
+    case SparkContext.DRIVER_IDENTIFIER => Some("driver")
+    // any other non-empty values since executor must has "spark.executor.id" 
set
 
 Review comment:
   Unnecessary comment.

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