You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2021/12/14 16:20:14 UTC

[incubator-kyuubi] branch branch-1.4 updated: [KYUUBI #1174][FOLLOWUP] change configuration(ha.zookeeper.publish.configs) default value to false

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

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


The following commit(s) were added to refs/heads/branch-1.4 by this push:
     new 3ac7d74  [KYUUBI #1174][FOLLOWUP] change configuration(ha.zookeeper.publish.configs) default value to false
3ac7d74 is described below

commit 3ac7d743e85658122b42060a1f618755ec84b37c
Author: sychen <sy...@trip.com>
AuthorDate: Wed Dec 15 00:09:30 2021 +0800

    [KYUUBI #1174][FOLLOWUP] change configuration(ha.zookeeper.publish.configs) default value to false
    
    Compatible with lower version of hive driver.
    https://github.com/apache/incubator-kyuubi/issues/1174
    
    - [ ] 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 #1553 from cxzl25/KYUUBI-1174-followup.
    
    Closes #1174
    
    39cbdf4c [sychen] trigger test
    908c4750 [sychen] gen settings
    f9e2eda0 [sychen] typo
    25300d56 [sychen] Modify the default value to false
    
    Authored-by: sychen <sy...@trip.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit 602bb23d36581b899b2549888dedbe72d41cb3c8)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 docs/deployment/settings.md                                        | 2 +-
 .../src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala | 7 ++++---
 .../main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala  | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md
index e6e9eb5..b66dca8 100644
--- a/docs/deployment/settings.md
+++ b/docs/deployment/settings.md
@@ -247,7 +247,7 @@ kyuubi\.ha\.zookeeper<br>\.connection\.timeout|<div style='width: 65pt;word-wrap
 kyuubi\.ha\.zookeeper<br>\.engine\.auth\.type|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>NONE</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>The type of zookeeper authentication for engine, all candidates are <ul><li>NONE</li><li> KERBEROS</li><li> DIGEST</li></ul></div>|<div style='width: 30pt'>string</div>|<div style='width: 20pt'>1.3.2</div>
 kyuubi\.ha\.zookeeper<br>\.namespace|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>kyuubi</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>The root directory for the service to deploy its instance uri. Additionally, it will creates a -[username] suffixed root directory for each application</div>|<div style='width: 30pt'>string</div>|<div style='width: 20pt'>1.0.0</div>
 kyuubi\.ha\.zookeeper<br>\.node\.creation\.timeout|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>PT2M</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Timeout for creating zookeeper node</div>|<div style='width: 30pt'>duration</div>|<div style='width: 20pt'>1.2.0</div>
-kyuubi\.ha\.zookeeper<br>\.publish\.configs|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>Whether we should publish Kerberos configs to ZooKeeper.</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.4.0</div>
+kyuubi\.ha\.zookeeper<br>\.publish\.configs|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>false</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>When set to true, publish Kerberos configs to Zookeeper.Note that the Hive driver needs to be greater than 1.3 or 2.0 or apply HIVE-11581 patch.</div>|<div style='width: 30pt'>boolean</div>|<div style='width: 20pt'>1.4.0</div>
 kyuubi\.ha\.zookeeper<br>\.quorum|<div style='width: 65pt;word-wrap: break-word;white-space: normal'></div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>The connection string for the zookeeper ensemble</div>|<div style='width: 30pt'>string</div>|<div style='width: 20pt'>1.0.0</div>
 kyuubi\.ha\.zookeeper<br>\.session\.timeout|<div style='width: 65pt;word-wrap: break-word;white-space: normal'>60000</div>|<div style='width: 170pt;word-wrap: break-word;white-space: normal'>The timeout(ms) of a connected session to be idled</div>|<div style='width: 30pt'>int</div>|<div style='width: 20pt'>1.0.0</div>
 
diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
index ed568a0..e6fee6c 100644
--- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
+++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala
@@ -142,10 +142,11 @@ object HighAvailabilityConf {
       .stringConf
       .createOptional
 
-  val HA_ZK_PUBLIST_CONFIGS: ConfigEntry[Boolean] =
+  val HA_ZK_PUBLISH_CONFIGS: ConfigEntry[Boolean] =
     buildConf("ha.zookeeper.publish.configs")
-      .doc("Whether we should publish Kerberos configs to ZooKeeper.")
+      .doc("When set to true, publish Kerberos configs to Zookeeper." +
+        "Note that the Hive driver needs to be greater than 1.3 or 2.0 or apply HIVE-11581 patch.")
       .version("1.4.0")
       .booleanConf
-      .createWithDefault(UserGroupInformation.isSecurityEnabled)
+      .createWithDefault(false)
 }
diff --git a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala
index 7246bdf..1297416 100644
--- a/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala
+++ b/kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/ServiceDiscovery.scala
@@ -265,7 +265,7 @@ object ServiceDiscovery extends Logging {
       if (external) CreateMode.PERSISTENT_SEQUENTIAL
       else CreateMode.EPHEMERAL_SEQUENTIAL
     val znodeData =
-      if (conf.get(HA_ZK_PUBLIST_CONFIGS) && session.isEmpty) {
+      if (conf.get(HA_ZK_PUBLISH_CONFIGS) && session.isEmpty) {
         addConfsToPublish(conf, instance)
       } else {
         instance