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

ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 01bebe3  [KYUUBI #1011] Fallback some frontend service config option 
about thrift
01bebe3 is described below

commit 01bebe36e81995ff38733a2e1b9dd432d2b60b3c
Author: yanghua <[email protected]>
AuthorDate: Fri Sep 3 09:30:29 2021 +0800

    [KYUUBI #1011] Fallback some frontend service config option about thrift
    
    <!--
    Thanks for sending a pull request!
    
    Here are some tips for you:
      1. If this is your first time, please read our contributor guidelines: 
https://kyuubi.readthedocs.io/en/latest/community/contributions.html
      2. If the PR is related to an issue in 
https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your 
PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
      3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., 
'[WIP][KYUUBI #XXXX] Your PR title ...'.
    -->
    
    ### _Why are the changes needed?_
    <!--
    Please clarify why the changes are needed. For instance,
      1. If you add a feature, you can talk about the use case of it.
      2. If you fix a bug, you can clarify why it is a bug.
    -->
    
    ### _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/latest/develop_tools/testing.html#running-tests)
 locally before make a pull request
    
    Closes #1016 from yanghua/KYUUBI-1011.
    
    Closes #1011
    
    78107b76 [yanghua] Addressed review suggestion
    651b5989 [yanghua] [KYUUBI #1011] Fallback some frontend service config 
option about thrift
    
    Authored-by: yanghua <[email protected]>
    Signed-off-by: ulysses-you <[email protected]>
---
 docs/deployment/settings.md                        | 24 ++++---
 .../kyuubi/engine/spark/SparkSQLEngine.scala       |  2 +-
 .../org/apache/kyuubi/config/KyuubiConf.scala      | 83 +++++++++++++++++++---
 .../kyuubi/service/ThriftFrontendService.scala     | 16 ++---
 .../org/apache/kyuubi/config/KyuubiConfSuite.scala | 14 ++--
 .../apache/kyuubi/service/ServerableSuite.scala    |  6 +-
 .../service/ThriftFrontendServiceSuite.scala       |  2 +-
 .../authentication/PlainSASLHelperSuite.scala      |  2 +-
 .../kyuubi/session/SessionManagerSuite.scala       |  2 +-
 .../apache/kyuubi/ctl/ServiceControlCliSuite.scala | 12 ++--
 .../kyuubi/ha/client/ServiceDiscoverySuite.scala   |  4 +-
 .../scala/org/apache/kyuubi/WithKyuubiServer.scala |  2 +-
 .../org/apache/kyuubi/engine/EngineRefSuite.scala  |  2 +-
 .../apache/kyuubi/server/KyuubiServerSuite.scala   |  4 +-
 14 files changed, 123 insertions(+), 52 deletions(-)

diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md
index be9a37f..c5b488f 100644
--- a/docs/deployment/settings.md
+++ b/docs/deployment/settings.md
@@ -183,14 +183,22 @@ kyuubi\.engine\.ui\.stop<br>\.enabled|<div style='width: 
65pt;word-wrap: break-w
 
 Key | Default | Meaning | Type | Since
 --- | --- | --- | --- | ---
-kyuubi\.frontend<br>\.backoff\.slot\.length|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>PT0.1S</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Time to back off during login 
to the frontend service.</div>|<div style='width: 30pt'>duration</div>|<div 
style='width: 20pt'>1.0.0</div>
-kyuubi\.frontend\.bind<br>\.host|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>&lt;undefined&gt;</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Hostname or IP of the machine 
on which to run the frontend service.</div>|<div style='width: 
30pt'>string</div>|<div style='width: 20pt'>1.0.0</div>
-kyuubi\.frontend\.bind<br>\.port|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>10009</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>Port of the machine on which to run the 
frontend service.</div>|<div style='width: 30pt'>int</div>|<div style='width: 
20pt'>1.0.0</div>
-kyuubi\.frontend\.login<br>\.timeout|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>PT20S</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>Timeout for Thrift clients during login to the 
frontend service.</div>|<div style='width: 30pt'>duration</div>|<div 
style='width: 20pt'>1.0.0</div>
-kyuubi\.frontend\.max<br>\.message\.size|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>104857600</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Maximum message size in bytes 
a Kyuubi server will accept.</div>|<div style='width: 30pt'>int</div>|<div 
style='width: 20pt'>1.0.0</div>
-kyuubi\.frontend\.max<br>\.worker\.threads|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>999</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>Maximum number of threads in the of frontend 
worker thread pool for the frontend service</div>|<div style='width: 
30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
-kyuubi\.frontend\.min<br>\.worker\.threads|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>9</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>Minimum number of threads in the of frontend 
worker thread pool for the frontend service</div>|<div style='width: 
30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
-kyuubi\.frontend<br>\.worker\.keepalive\.time|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>PT1M</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Keep-alive time (in 
milliseconds) for an idle worker thread</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend<br>\.backoff\.slot\.length|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>PT0.1S</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>(deprecated) Time to back off 
during login to the thrift frontend service.</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend\.bind<br>\.host|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>&lt;undefined&gt;</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>(deprecated) Hostname or IP of 
the machine on which to run the thrift frontend service via binary 
protocol.</div>|<div style='width: 30pt'>string</div>|<div style='width: 
20pt'>1.0.0</div>
+kyuubi\.frontend\.bind<br>\.port|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>10009</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>(deprecated) Port of the machine on which to 
run the thrift frontend service via binary protocol.</div>|<div style='width: 
30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend\.login<br>\.timeout|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>PT20S</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>(deprecated) Timeout for Thrift clients during 
login to the thrift frontend service.</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend\.max<br>\.message\.size|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>104857600</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>(deprecated) Maximum message 
size in bytes a Kyuubi server will accept.</div>|<div style='width: 
30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend\.max<br>\.worker\.threads|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>999</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>(deprecated) Maximum number of threads in the 
of frontend worker thread pool for the thrift frontend service</div>|<div 
style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend\.min<br>\.worker\.threads|<div style='width: 65pt;word-wrap: 
break-word;white-space: normal'>9</div>|<div style='width: 170pt;word-wrap: 
break-word;white-space: normal'>(deprecated) Minimum number of threads in the 
of frontend worker thread pool for the thrift frontend service</div>|<div 
style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
+kyuubi\.frontend<br>\.thrift\.backoff\.slot<br>\.length|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>PT0.1S</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Time to back off during login 
to the thrift frontend service.</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.binary\.bind<br>\.host|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>&lt;undefined&gt;</div>|<div 
style='width: 170pt;word-wrap: break-word;white-space: normal'>Hostname or IP 
of the machine on which to run the thrift frontend service via binary 
protocol.</div>|<div style='width: 30pt'>string</div>|<div style='width: 
20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.binary\.bind<br>\.port|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>10009</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Port of the machine on which 
to run the thrift frontend service via binary protocol.</div>|<div 
style='width: 30pt'>int</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.login\.timeout|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>PT20S</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Timeout for Thrift clients 
during login to the thrift frontend service.</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.max\.message<br>\.size|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>104857600</div>|<div 
style='width: 170pt;word-wrap: break-word;white-space: normal'>Maximum message 
size in bytes a Kyuubi server will accept.</div>|<div style='width: 
30pt'>int</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.max\.worker<br>\.threads|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>999</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Maximum number of threads in 
the of frontend worker thread pool for the thrift frontend service</div>|<div 
style='width: 30pt'>int</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.min\.worker<br>\.threads|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>9</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Minimum number of threads in 
the of frontend worker thread pool for the thrift frontend service</div>|<div 
style='width: 30pt'>int</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.thrift\.worker<br>\.keepalive\.time|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>PT1M</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>Keep-alive time (in 
milliseconds) for an idle worker thread</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.frontend<br>\.worker\.keepalive\.time|<div style='width: 
65pt;word-wrap: break-word;white-space: normal'>PT1M</div>|<div style='width: 
170pt;word-wrap: break-word;white-space: normal'>(deprecated) Keep-alive time 
(in milliseconds) for an idle worker thread</div>|<div style='width: 
30pt'>duration</div>|<div style='width: 20pt'>1.0.0</div>
 
 
 ### Ha
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 bed9f7b..6968e07 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
@@ -105,7 +105,7 @@ object SparkSQLEngine extends Logging {
     val defaultCat = if (KyuubiSparkUtil.hiveClassesArePresent) "hive" else 
"in-memory"
     sparkConf.setIfMissing("spark.sql.catalogImplementation", defaultCat)
 
-    kyuubiConf.setIfMissing(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    kyuubiConf.setIfMissing(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     kyuubiConf.setIfMissing(HA_ZK_CONN_RETRY_POLICY, 
RetryPolicies.N_TIME.toString)
 
     // Pass kyuubi config from spark with `spark.kyuubi`
diff --git 
a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala 
b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
index 48da7ea..28611cd 100644
--- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
+++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala
@@ -132,6 +132,8 @@ case class KyuubiConf(loadSysDefault: Boolean = true) 
extends Logging {
   private val serverOnlyConfEntries: Set[ConfigEntry[_]] = Set(
     FRONTEND_BIND_HOST,
     FRONTEND_BIND_PORT,
+    FRONTEND_THRIFT_BINARY_BIND_HOST,
+    FRONTEND_THRIFT_BINARY_BIND_PORT,
     AUTHENTICATION_METHOD,
     SERVER_KEYTAB,
     SERVER_PRINCIPAL,
@@ -235,61 +237,122 @@ object KyuubiConf {
   //                              Frontend Service Configuration               
                  //
   
/////////////////////////////////////////////////////////////////////////////////////////////////
 
+  @deprecated(s"using ${FRONTEND_THRIFT_BINARY_BIND_HOST.key} instead", 
"1.4.0")
   val FRONTEND_BIND_HOST: OptionalConfigEntry[String] = 
buildConf("frontend.bind.host")
-    .doc("Hostname or IP of the machine on which to run the frontend service.")
+    .doc("(deprecated) Hostname or IP of the machine on which to run the 
thrift frontend service " +
+      "via binary protocol.")
     .version("1.0.0")
     .stringConf
     .createOptional
 
+  val FRONTEND_THRIFT_BINARY_BIND_HOST: ConfigEntry[Option[String]] =
+    buildConf("frontend.thrift.binary.bind.host")
+    .doc("Hostname or IP of the machine on which to run the thrift frontend 
service " +
+      "via binary protocol.")
+    .version("1.4.0")
+    .fallbackConf(FRONTEND_BIND_HOST)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_BINARY_BIND_PORT.key} instead", 
"1.4.0")
   val FRONTEND_BIND_PORT: ConfigEntry[Int] = buildConf("frontend.bind.port")
-    .doc("Port of the machine on which to run the frontend service.")
+    .doc("(deprecated) Port of the machine on which to run the thrift frontend 
service " +
+      "via binary protocol.")
     .version("1.0.0")
     .intConf
     .checkValue(p => p == 0 || (p > 1024 && p < 65535), "Invalid Port number")
     .createWithDefault(10009)
 
+  val FRONTEND_THRIFT_BINARY_BIND_PORT: ConfigEntry[Int] =
+    buildConf("frontend.thrift.binary.bind.port")
+    .doc("Port of the machine on which to run the thrift frontend service via 
binary protocol.")
+    .version("1.4.0")
+    .fallbackConf(FRONTEND_BIND_PORT)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_MIN_WORKER_THREADS.key} instead", 
"1.4.0")
   val FRONTEND_MIN_WORKER_THREADS: ConfigEntry[Int] = 
buildConf("frontend.min.worker.threads")
-    .doc("Minimum number of threads in the of frontend worker thread pool for 
the frontend" +
-      " service")
+    .doc("(deprecated) Minimum number of threads in the of frontend worker 
thread pool for " +
+      "the thrift frontend service")
     .version("1.0.0")
     .intConf
     .createWithDefault(9)
 
+  val FRONTEND_THRIFT_MIN_WORKER_THREADS: ConfigEntry[Int] =
+    buildConf("frontend.thrift.min.worker.threads")
+    .doc("Minimum number of threads in the of frontend worker thread pool for 
the thrift " +
+      "frontend service")
+    .version("1.4.0")
+    .fallbackConf(FRONTEND_MIN_WORKER_THREADS)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_MAX_WORKER_THREADS.key} instead", 
"1.4.0")
   val FRONTEND_MAX_WORKER_THREADS: ConfigEntry[Int] = 
buildConf("frontend.max.worker.threads")
-    .doc("Maximum number of threads in the of frontend worker thread pool for 
the frontend" +
-      " service")
+    .doc("(deprecated) Maximum number of threads in the of frontend worker 
thread pool for " +
+      "the thrift frontend service")
     .version("1.0.0")
     .intConf
     .createWithDefault(999)
 
+  val FRONTEND_THRIFT_MAX_WORKER_THREADS: ConfigEntry[Int] =
+    buildConf("frontend.thrift.max.worker.threads")
+    .doc("Maximum number of threads in the of frontend worker thread pool for 
the thrift " +
+      "frontend service")
+    .version("1.4.0")
+    .fallbackConf(FRONTEND_MAX_WORKER_THREADS)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_WORKER_KEEPALIVE_TIME.key} instead", 
"1.4.0")
   val FRONTEND_WORKER_KEEPALIVE_TIME: ConfigEntry[Long] =
     buildConf("frontend.worker.keepalive.time")
-      .doc("Keep-alive time (in milliseconds) for an idle worker thread")
+      .doc("(deprecated) Keep-alive time (in milliseconds) for an idle worker 
thread")
       .version("1.0.0")
       .timeConf
       .createWithDefault(Duration.ofSeconds(60).toMillis)
 
+  val FRONTEND_THRIFT_WORKER_KEEPALIVE_TIME: ConfigEntry[Long] =
+    buildConf("frontend.thrift.worker.keepalive.time")
+      .doc("Keep-alive time (in milliseconds) for an idle worker thread")
+      .version("1.4.0")
+      .fallbackConf(FRONTEND_WORKER_KEEPALIVE_TIME)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_WORKER_KEEPALIVE_TIME.key} instead", 
"1.4.0")
   val FRONTEND_MAX_MESSAGE_SIZE: ConfigEntry[Int] =
     buildConf("frontend.max.message.size")
-      .doc("Maximum message size in bytes a Kyuubi server will accept.")
+      .doc("(deprecated) Maximum message size in bytes a Kyuubi server will 
accept.")
       .version("1.0.0")
       .intConf
       .createWithDefault(104857600)
 
+  val FRONTEND_THRIFT_MAX_MESSAGE_SIZE: ConfigEntry[Int] =
+    buildConf("frontend.thrift.max.message.size")
+      .doc("Maximum message size in bytes a Kyuubi server will accept.")
+      .version("1.4.0")
+      .fallbackConf(FRONTEND_MAX_MESSAGE_SIZE)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_LOGIN_TIMEOUT.key} instead", "1.4.0")
   val FRONTEND_LOGIN_TIMEOUT: ConfigEntry[Long] =
     buildConf("frontend.login.timeout")
-      .doc("Timeout for Thrift clients during login to the frontend service.")
+      .doc("(deprecated) Timeout for Thrift clients during login to the thrift 
frontend service.")
       .version("1.0.0")
       .timeConf
       .createWithDefault(Duration.ofSeconds(20).toMillis)
 
+  val FRONTEND_THRIFT_LOGIN_TIMEOUT: ConfigEntry[Long] =
+    buildConf("frontend.thrift.login.timeout")
+      .doc("Timeout for Thrift clients during login to the thrift frontend 
service.")
+      .version("1.4.0")
+      .fallbackConf(FRONTEND_LOGIN_TIMEOUT)
+
+  @deprecated(s"using ${FRONTEND_THRIFT_LOGIN_BACKOFF_SLOT_LENGTH.key} 
instead", "1.4.0")
   val FRONTEND_LOGIN_BACKOFF_SLOT_LENGTH: ConfigEntry[Long] =
     buildConf("frontend.backoff.slot.length")
-      .doc("Time to back off during login to the frontend service.")
+      .doc("(deprecated) Time to back off during login to the thrift frontend 
service.")
       .version("1.0.0")
       .timeConf
       .createWithDefault(Duration.ofMillis(100).toMillis)
 
+  val FRONTEND_THRIFT_LOGIN_BACKOFF_SLOT_LENGTH: ConfigEntry[Long] =
+    buildConf("frontend.thrift.backoff.slot.length")
+      .doc("Time to back off during login to the thrift frontend service.")
+      .version("1.4.0")
+      .fallbackConf(FRONTEND_LOGIN_BACKOFF_SLOT_LENGTH)
+
   val AUTHENTICATION_METHOD: ConfigEntry[String] = buildConf("authentication")
     .doc("Client authentication types.<ul>" +
       " <li>NOSASL: raw transport.</li>" +
diff --git 
a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ThriftFrontendService.scala
 
b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ThriftFrontendService.scala
index 0938aef..dbe2621 100644
--- 
a/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ThriftFrontendService.scala
+++ 
b/kyuubi-common/src/main/scala/org/apache/kyuubi/service/ThriftFrontendService.scala
@@ -60,12 +60,12 @@ class ThriftFrontendService private(name: String, be: 
BackendService, oomHook: R
     this.conf = conf
     try {
       hadoopConf = KyuubiHadoopUtils.newHadoopConf(conf)
-      val serverHost = conf.get(FRONTEND_BIND_HOST)
+      val serverHost = conf.get(FRONTEND_THRIFT_BINARY_BIND_HOST)
       serverAddr = 
serverHost.map(InetAddress.getByName).getOrElse(Utils.findLocalInetAddress)
-      portNum = conf.get(FRONTEND_BIND_PORT)
-      val minThreads = conf.get(FRONTEND_MIN_WORKER_THREADS)
-      val maxThreads = conf.get(FRONTEND_MAX_WORKER_THREADS)
-      val keepAliveTime = conf.get(FRONTEND_WORKER_KEEPALIVE_TIME)
+      portNum = conf.get(FRONTEND_THRIFT_BINARY_BIND_PORT)
+      val minThreads = conf.get(FRONTEND_THRIFT_MIN_WORKER_THREADS)
+      val maxThreads = conf.get(FRONTEND_THRIFT_MAX_WORKER_THREADS)
+      val keepAliveTime = conf.get(FRONTEND_THRIFT_WORKER_KEEPALIVE_TIME)
       val executor = ExecutorPoolCaptureOom(
         name + "Handler-Pool",
         minThreads, maxThreads,
@@ -78,9 +78,9 @@ class ThriftFrontendService private(name: String, be: 
BackendService, oomHook: R
       portNum = serverSocket.getLocalPort
       val tServerSocket = new TServerSocket(serverSocket)
 
-      val maxMessageSize = conf.get(FRONTEND_MAX_MESSAGE_SIZE)
-      val requestTimeout = conf.get(FRONTEND_LOGIN_TIMEOUT).toInt
-      val beBackoffSlotLength = 
conf.get(FRONTEND_LOGIN_BACKOFF_SLOT_LENGTH).toInt
+      val maxMessageSize = conf.get(FRONTEND_THRIFT_MAX_MESSAGE_SIZE)
+      val requestTimeout = conf.get(FRONTEND_THRIFT_LOGIN_TIMEOUT).toInt
+      val beBackoffSlotLength = 
conf.get(FRONTEND_THRIFT_LOGIN_BACKOFF_SLOT_LENGTH).toInt
 
       val args = new TThreadPoolServer.Args(tServerSocket)
         .processorFactory(tProcFactory)
diff --git 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/config/KyuubiConfSuite.scala 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/config/KyuubiConfSuite.scala
index e49f287..9e859c8 100644
--- 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/config/KyuubiConfSuite.scala
+++ 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/config/KyuubiConfSuite.scala
@@ -55,23 +55,23 @@ class KyuubiConfSuite extends KyuubiFunSuite {
     conf.set(OPERATION_IDLE_TIMEOUT, 5L)
     assert(conf.get(OPERATION_IDLE_TIMEOUT) === 5)
 
-    conf.set(FRONTEND_BIND_HOST, "kentyao.org")
-    assert(conf.get(FRONTEND_BIND_HOST).get === "kentyao.org")
+    conf.set(FRONTEND_THRIFT_BINARY_BIND_HOST.key, "kentyao.org")
+    assert(conf.get(FRONTEND_THRIFT_BINARY_BIND_HOST).get === "kentyao.org")
 
     conf.setIfMissing(OPERATION_IDLE_TIMEOUT, 60L)
     assert(conf.get(OPERATION_IDLE_TIMEOUT) === 5)
 
-    conf.setIfMissing(FRONTEND_MIN_WORKER_THREADS, 2188)
-    assert(conf.get(FRONTEND_MIN_WORKER_THREADS) === 2188)
+    conf.setIfMissing(FRONTEND_THRIFT_MIN_WORKER_THREADS, 2188)
+    assert(conf.get(FRONTEND_THRIFT_MIN_WORKER_THREADS) === 2188)
 
-    conf.unset(FRONTEND_MIN_WORKER_THREADS)
-    assert(conf.get(FRONTEND_MIN_WORKER_THREADS) === 9)
+    conf.unset(FRONTEND_THRIFT_MIN_WORKER_THREADS)
+    assert(conf.get(FRONTEND_THRIFT_MIN_WORKER_THREADS) === 9)
 
     conf.unset(key)
     assert(conf.getOption(key).isEmpty)
 
     val map = conf.getAllWithPrefix("kyuubi", "")
-    assert(map(FRONTEND_BIND_HOST.key.substring(7)) === "kentyao.org")
+    assert(map(FRONTEND_THRIFT_BINARY_BIND_HOST.key.substring(7)) === 
"kentyao.org")
     val map1 = conf.getAllWithPrefix("kyuubi", "operation")
     assert(map1(OPERATION_IDLE_TIMEOUT.key.substring(7)) === "PT0.005S")
     assert(map1.size === 1)
diff --git 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ServerableSuite.scala 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ServerableSuite.scala
index d929278..8d6950f 100644
--- 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ServerableSuite.scala
+++ 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ServerableSuite.scala
@@ -24,7 +24,7 @@ class ServerableSuite extends KyuubiFunSuite {
 
   ignore("Serverable") {
     val serverable1 = new NoopServer()
-    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     serverable1.initialize(conf)
     assert(serverable1.getStartTime === 0)
     assert(serverable1.getConf === conf)
@@ -43,7 +43,7 @@ class ServerableSuite extends KyuubiFunSuite {
   }
 
   test("invalid port") {
-    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_BIND_PORT, 100)
+    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 
100)
     val e = intercept[KyuubiException](new NoopServer().initialize(conf))
     assert(e.getMessage.contains("Failed to initialize frontend service"))
     assert(e.getCause.getMessage === "Invalid Port number")
@@ -51,7 +51,7 @@ class ServerableSuite extends KyuubiFunSuite {
 
   test("error start child services") {
     val conf = KyuubiConf()
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
       .set("kyuubi.test.server.should.fail", "true")
     val server = new NoopServer()
     server.initialize(conf)
diff --git 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ThriftFrontendServiceSuite.scala
 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ThriftFrontendServiceSuite.scala
index b0203b5..ca5d5b2 100644
--- 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ThriftFrontendServiceSuite.scala
+++ 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/ThriftFrontendServiceSuite.scala
@@ -37,7 +37,7 @@ class ThriftFrontendServiceSuite extends KyuubiFunSuite {
 
   protected val server = new NoopServer()
   protected val conf = KyuubiConf()
-    .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     .set("kyuubi.test.server.should.fail", "false")
 
   val user: String = System.getProperty("user.name")
diff --git 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala
 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala
index b57b316..de0055b 100644
--- 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala
+++ 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/service/authentication/PlainSASLHelperSuite.scala
@@ -30,7 +30,7 @@ class PlainSASLHelperSuite extends KyuubiFunSuite {
 
   test("PlainSASLHelper") {
     val server = new NoopServer()
-    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     server.initialize(conf)
     val service = server.getServices(0).asInstanceOf[ThriftFrontendService]
     val tProcessorFactory = PlainSASLHelper.getProcessFactory(service)
diff --git 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala
 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala
index a79463a..3e8c893 100644
--- 
a/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala
+++ 
b/kyuubi-common/src/test/scala/org/apache/kyuubi/session/SessionManagerSuite.scala
@@ -29,7 +29,7 @@ import org.apache.kyuubi.service.ThriftFrontendServiceSuite
 class SessionManagerSuite extends ThriftFrontendServiceSuite with Eventually {
 
   override val conf = KyuubiConf()
-    .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     .set("kyuubi.test.server.should.fail", "false")
     .set(KyuubiConf.SESSION_CHECK_INTERVAL, Duration.ofSeconds(5).toMillis)
     .set(KyuubiConf.SESSION_IDLE_TIMEOUT, Duration.ofSeconds(5).toMillis)
diff --git 
a/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ServiceControlCliSuite.scala 
b/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ServiceControlCliSuite.scala
index 4ecdf4a..9bd4d03 100644
--- 
a/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ServiceControlCliSuite.scala
+++ 
b/kyuubi-ctl/src/test/scala/org/apache/kyuubi/ctl/ServiceControlCliSuite.scala
@@ -137,7 +137,7 @@ class ServiceControlCliSuite extends KyuubiFunSuite with 
TestPrematureExit {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, namespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
 
     val args = Array(
       "create", "server",
@@ -184,7 +184,7 @@ class ServiceControlCliSuite extends KyuubiFunSuite with 
TestPrematureExit {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, uniqueNamespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     System.setProperty(HA_ZK_NAMESPACE.key, uniqueNamespace)
 
     withZkClient(conf) { framework =>
@@ -242,7 +242,7 @@ class ServiceControlCliSuite extends KyuubiFunSuite with 
TestPrematureExit {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, uniqueNamespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
 
     withZkClient(conf) { framework =>
       createServiceNode(conf, framework, uniqueNamespace, "localhost:10000")
@@ -270,7 +270,7 @@ class ServiceControlCliSuite extends KyuubiFunSuite with 
TestPrematureExit {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, uniqueNamespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
 
     withZkClient(conf) { framework =>
       createServiceNode(conf, framework, uniqueNamespace, "localhost:10000")
@@ -299,7 +299,7 @@ class ServiceControlCliSuite extends KyuubiFunSuite with 
TestPrematureExit {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, uniqueNamespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
 
     withZkClient(conf) { framework =>
       withZkClient(conf) { zc =>
@@ -330,7 +330,7 @@ class ServiceControlCliSuite extends KyuubiFunSuite with 
TestPrematureExit {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, uniqueNamespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
 
     withZkClient(conf) { framework =>
       createServiceNode(conf, framework, uniqueNamespace, "localhost:10000")
diff --git 
a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
 
b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
index 2217e80..8ab4b40 100644
--- 
a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
+++ 
b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/ServiceDiscoverySuite.scala
@@ -63,7 +63,7 @@ class ServiceDiscoverySuite extends KerberizedTestHelper {
       .unset(KyuubiConf.SERVER_PRINCIPAL)
       .set(HA_ZK_QUORUM, zkServer.getConnectString)
       .set(HA_ZK_NAMESPACE, namespace)
-      .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+      .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
 
     val server: Serverable = new NoopServer()
     server.initialize(conf)
@@ -146,7 +146,7 @@ class ServiceDiscoverySuite extends KerberizedTestHelper {
         .unset(KyuubiConf.SERVER_PRINCIPAL)
         .set(HA_ZK_QUORUM, zkServer.getConnectString)
         .set(HA_ZK_NAMESPACE, namespace)
-        .set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+        .set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
         .set(HA_ZK_ACL_ENABLED, false)
 
       val server: Serverable = new NoopServer()
diff --git 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServer.scala 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServer.scala
index c380876..2901dd2 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServer.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/WithKyuubiServer.scala
@@ -40,7 +40,7 @@ trait WithKyuubiServer extends KyuubiFunSuite {
 
     conf.set("spark.ui.enabled", "false")
     conf.setIfMissing("spark.sql.catalogImplementation", "in-memory")
-    conf.set(FRONTEND_BIND_PORT, 0)
+    conf.set(FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     conf.setIfMissing(ENGINE_CHECK_INTERVAL, 3000L)
     conf.setIfMissing(ENGINE_IDLE_TIMEOUT, 10000L)
     conf.set(HA_ZK_QUORUM, zkServer.getConnectString)
diff --git 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefSuite.scala 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefSuite.scala
index 066d496..71cd73d 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefSuite.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefSuite.scala
@@ -133,7 +133,7 @@ class EngineRefSuite extends KyuubiFunSuite {
   test("start and get engine address with lock") {
     val id = SessionHandle(TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V10)
     conf.set(KyuubiConf.ENGINE_SHARE_LEVEL, USER.toString)
-    conf.set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    conf.set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     conf.set(HighAvailabilityConf.HA_ZK_NAMESPACE, "engine_test")
     conf.set(HighAvailabilityConf.HA_ZK_QUORUM, zkServer.getConnectString)
     val engine = EngineRef(conf, user, id)
diff --git 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/KyuubiServerSuite.scala 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/KyuubiServerSuite.scala
index d44b8f2..3c24752 100644
--- 
a/kyuubi-server/src/test/scala/org/apache/kyuubi/server/KyuubiServerSuite.scala
+++ 
b/kyuubi-server/src/test/scala/org/apache/kyuubi/server/KyuubiServerSuite.scala
@@ -26,7 +26,7 @@ class KyuubiServerSuite extends KyuubiFunSuite {
   test("kyuubi server basic") {
     val server = new KyuubiServer()
     server.stop()
-    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_BIND_PORT, 0)
+    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
     assert(server.getServices.isEmpty)
     assert(server.getServiceState === LATENT)
     val e = intercept[IllegalStateException](server.connectionUrl)
@@ -60,7 +60,7 @@ class KyuubiServerSuite extends KyuubiFunSuite {
   }
 
   test("invalid port") {
-    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_BIND_PORT, 100)
+    val conf = KyuubiConf().set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 
100)
     val e = intercept[KyuubiException](new KyuubiServer().initialize(conf))
     assert(e.getMessage.contains("Failed to initialize frontend service"))
     assert(e.getCause.getMessage === "Invalid Port number")

Reply via email to