dongjoon-hyun commented on code in PR #39769:
URL: https://github.com/apache/spark/pull/39769#discussion_r1088705615


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/scheduler/cluster/k8s/KubernetesClusterManager.scala:
##########
@@ -54,13 +54,14 @@ private[spark] class KubernetesClusterManager extends 
ExternalClusterManager wit
       scheduler: TaskScheduler): SchedulerBackend = {
     if (isLocal(sc.conf)) {
       def localCpuCount: Int = Runtime.getRuntime.availableProcessors()
-      val threadCount = masterURL match {
+      val threadCount = sc.conf.get(KUBERNETES_DRIVER_MASTER_URL) match {
         case LOCAL_N_REGEX(threads) =>
-          if (threads == "*") localCpuCount else 1
+          if (threads == "*") localCpuCount else threads.toInt
         case LOCAL_N_FAILURES_REGEX(threads, _) =>
-          if (threads == "*") localCpuCount else 1
+          if (threads == "*") localCpuCount else threads.toInt
         case _ => 1
       }
+      logInfo(s"Running Spark with 
${sc.conf.get(KUBERNETES_DRIVER_MASTER_URL)}")

Review Comment:
   This is added for testing.
   ```
   23/01/27 08:42:45 INFO KubernetesClusterManager: Running Spark with local[10]
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to