This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.8 by this push:
     new f8516357d [KYUUBI #5339] [MINOR] Avoid using 
`kyuubi.session.engine.initialize.timeout` string
f8516357d is described below

commit f8516357dee07b6e88ca53e3ba58d9319cc82855
Author: sychen <[email protected]>
AuthorDate: Thu Sep 28 05:05:40 2023 +0000

    [KYUUBI #5339] [MINOR] Avoid using 
`kyuubi.session.engine.initialize.timeout` string
    
    ### _Why are the changes needed?_
    
    Replace string literal with constant variable
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [ ] [Run 
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
 locally before make a pull request
    
    ### _Was this patch authored or co-authored using generative AI tooling?_
    No
    
    Closes #5339 from cxzl25/use_engine_init_timeout_key.
    
    Closes #5339
    
    bef2eaa4a [sychen] fix
    
    Authored-by: sychen <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit 99789a82c1271a0cfe24147118db70002169df71)
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala     | 2 +-
 .../org/apache/kyuubi/engine/spark/IndividualSparkSuite.scala     | 2 +-
 .../kubernetes/test/spark/SparkOnKubernetesTestsSuite.scala       | 8 ++++----
 .../src/test/scala/org/apache/kyuubi/WithKyuubiServerOnYarn.scala | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
index 5f91bc73d..ba84e1b1b 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/SparkSQLEngine.scala
@@ -376,7 +376,7 @@ object SparkSQLEngine extends Logging {
         case i: InterruptedException if !sparkSessionCreated.get =>
           error(
             s"The Engine main thread was interrupted, possibly due to 
`createSpark` timeout." +
-              s" The `kyuubi.session.engine.initialize.timeout` is 
($initTimeout ms) " +
+              s" The `${ENGINE_INIT_TIMEOUT.key}` is ($initTimeout ms) " +
               s" and submitted at $submitTime.",
             i)
         case t: Throwable => error(s"Failed to instantiate SparkSession: 
${t.getMessage}", t)
diff --git 
a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/IndividualSparkSuite.scala
 
b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/IndividualSparkSuite.scala
index c6789d14d..8fca1d0ca 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/IndividualSparkSuite.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/IndividualSparkSuite.scala
@@ -114,7 +114,7 @@ class SparkEngineSuites extends KyuubiFunSuite {
       }
       assert(SparkSQLEngine.currentEngine.isEmpty)
       val errorMsg = s"The Engine main thread was interrupted, possibly due to 
`createSpark`" +
-        s" timeout. The `kyuubi.session.engine.initialize.timeout` is 
($timeout ms) " +
+        s" timeout. The `${ENGINE_INIT_TIMEOUT.key}` is ($timeout ms) " +
         s" and submitted at $submitTime."
       assert(logAppender.loggingEvents.exists(
         _.getMessage.getFormattedMessage.equals(errorMsg)))
diff --git 
a/integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/spark/SparkOnKubernetesTestsSuite.scala
 
b/integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/spark/SparkOnKubernetesTestsSuite.scala
index 3f591e604..09532efe3 100644
--- 
a/integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/spark/SparkOnKubernetesTestsSuite.scala
+++ 
b/integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/spark/SparkOnKubernetesTestsSuite.scala
@@ -27,7 +27,7 @@ import org.apache.hadoop.net.NetUtils
 import org.apache.kyuubi._
 import org.apache.kyuubi.client.util.BatchUtils._
 import org.apache.kyuubi.config.KyuubiConf
-import org.apache.kyuubi.config.KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_HOST
+import org.apache.kyuubi.config.KyuubiConf._
 import org.apache.kyuubi.engine.{ApplicationInfo, ApplicationManagerInfo, 
ApplicationOperation, KubernetesApplicationOperation}
 import org.apache.kyuubi.engine.ApplicationState.{FAILED, NOT_FOUND, RUNNING}
 import org.apache.kyuubi.engine.spark.SparkProcessBuilder
@@ -57,9 +57,9 @@ abstract class SparkOnKubernetesSuiteBase
       .set("spark.driver.memory", "512M")
       .set("spark.kubernetes.driver.request.cores", "250m")
       .set("spark.kubernetes.executor.request.cores", "250m")
-      .set("kyuubi.kubernetes.context", "minikube")
-      .set("kyuubi.frontend.protocols", "THRIFT_BINARY,REST")
-      .set("kyuubi.session.engine.initialize.timeout", "PT10M")
+      .set(KUBERNETES_CONTEXT.key, "minikube")
+      .set(FRONTEND_PROTOCOLS.key, "THRIFT_BINARY,REST")
+      .set(ENGINE_INIT_TIMEOUT.key, "PT10M")
   }
 }
 
diff --git 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServerOnYarn.scala 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServerOnYarn.scala
index e4382a859..012f4df16 100644
--- 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServerOnYarn.scala
+++ 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServerOnYarn.scala
@@ -198,7 +198,7 @@ class KyuubiOperationYarnClusterSuite extends 
WithKyuubiServerOnYarn with HiveJD
       "spark.submit.deployMode" -> "cluster",
       "spark.sql.defaultCatalog=spark_catalog" -> "spark_catalog",
       "spark.sql.catalog.spark_catalog.type" -> "invalid_type",
-      "kyuubi.session.engine.initialize.timeout" -> "PT10M",
+      ENGINE_INIT_TIMEOUT.key -> "PT10M",
       KYUUBI_BATCH_ID_KEY -> UUID.randomUUID().toString))(Map.empty) {
       val startTime = System.currentTimeMillis()
       val exception = intercept[Exception] {

Reply via email to