From 49480566402defcfcf36ae03d2dcccc4d7f686b3 Mon Sep 17 00:00:00 2001 From: yongqian Date: Mon, 12 Dec 2022 11:30:33 +0800 Subject: [PATCH] [KYUUBI #3686] The `authentication.kerberos.principal` value posted to zk should keep the original value ### _Why are the changes needed?_ close #3686 ### _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 - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3961 from QianyongY/features/kyuubi-3686. Closes #3686 958432c6 [yongqian] [KYUUBI #3686] The value posted to zk should keep the original value Authored-by: yongqian Signed-off-by: Shaoyun Chen --- .../kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala index ca46d1130..521cf8ec4 100644 --- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala +++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClient.scala @@ -57,7 +57,6 @@ import org.apache.kyuubi.ha.client.ServiceNodeInfo import org.apache.kyuubi.ha.client.zookeeper.ZookeeperClientProvider.buildZookeeperClient import org.apache.kyuubi.ha.client.zookeeper.ZookeeperClientProvider.getGracefulStopThreadDelay import org.apache.kyuubi.ha.client.zookeeper.ZookeeperDiscoveryClient.connectionChecker -import org.apache.kyuubi.util.KyuubiHadoopUtils import org.apache.kyuubi.util.ThreadUtils class ZookeeperDiscoveryClient(conf: KyuubiConf) extends DiscoveryClient { @@ -338,8 +337,7 @@ class ZookeeperDiscoveryClient(conf: KyuubiConf) extends DiscoveryClient { confsToPublish += ("hive.server2.authentication" -> authenticationMethod) if (authenticationMethod.equalsIgnoreCase("KERBEROS")) { confsToPublish += ("hive.server2.authentication.kerberos.principal" -> - conf.get(KyuubiConf.SERVER_PRINCIPAL).map(KyuubiHadoopUtils.getServerPrincipal) - .getOrElse("")) + conf.get(KyuubiConf.SERVER_PRINCIPAL).getOrElse("")) } confsToPublish.map { case (k, v) => k + "=" + v }.mkString(";") }