pan3793 commented on code in PR #3852:
URL: https://github.com/apache/incubator-kyuubi/pull/3852#discussion_r1032160219


##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala:
##########
@@ -53,8 +55,30 @@ class SparkProcessBuilder(
     Paths.get(sparkHome, "bin", SPARK_SUBMIT_FILE).toFile.getCanonicalPath
   }
 
+  initialize
+
   override def mainClass: String = 
"org.apache.kyuubi.engine.spark.SparkSQLEngine"
 
+  /**
+   * Add or override spark.master if KUBERNETES_SERVICE_HOST and
+   * KUBERNETES_SERVICE_PORT are defined
+   */
+  protected def initialize(): Unit = {
+    try {
+      if (conf.get(KUBERNETES_MASTER_OVERRIDE)) {

Review Comment:
   how about try auto configure it iff `spark.master` is absent?



##########
kyuubi-server/src/main/scala/org/apache/kyuubi/engine/spark/SparkProcessBuilder.scala:
##########
@@ -53,8 +55,30 @@ class SparkProcessBuilder(
     Paths.get(sparkHome, "bin", SPARK_SUBMIT_FILE).toFile.getCanonicalPath
   }
 
+  initialize
+
   override def mainClass: String = 
"org.apache.kyuubi.engine.spark.SparkSQLEngine"
 
+  /**
+   * Add or override spark.master if KUBERNETES_SERVICE_HOST and
+   * KUBERNETES_SERVICE_PORT are defined
+   */
+  protected def initialize(): Unit = {
+    try {
+      if (conf.get(KUBERNETES_MASTER_OVERRIDE)) {

Review Comment:
   how about trying to auto configure it iff `spark.master` is absent?



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