Skip to content

Commit 602bb23

Browse files
cxzl25pan3793
authored andcommitted
[KYUUBI #1174][FOLLOWUP] change configuration(ha.zookeeper.publish.configs) default value to false
### _Why are the changes needed?_ Compatible with lower version of hive driver. #1174 ### _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 #1553 from cxzl25/KYUUBI-1174-followup. Closes #1174 39cbdf4 [sychen] trigger test 908c475 [sychen] gen settings f9e2eda [sychen] typo 25300d5 [sychen] Modify the default value to false Authored-by: sychen <sychen@trip.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
1 parent c1a0ce8 commit 602bb23

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/deployment/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ kyuubi\.ha\.zookeeper<br>\.connection\.timeout|<div style='width: 65pt;word-wrap
247247
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>
248248
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</div>|<div style='width: 30pt'>string</div>|<div style='width: 20pt'>1.0.0</div>
249249
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>
250-
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>
250+
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>
251251
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>
252252
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>
253253

kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/HighAvailabilityConf.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ object HighAvailabilityConf {
141141
.stringConf
142142
.createOptional
143143

144-
val HA_ZK_PUBLIST_CONFIGS: ConfigEntry[Boolean] =
144+
val HA_ZK_PUBLISH_CONFIGS: ConfigEntry[Boolean] =
145145
buildConf("ha.zookeeper.publish.configs")
146-
.doc("Whether we should publish Kerberos configs to ZooKeeper.")
146+
.doc("When set to true, publish Kerberos configs to Zookeeper." +
147+
"Note that the Hive driver needs to be greater than 1.3 or 2.0 or apply HIVE-11581 patch.")
147148
.version("1.4.0")
148149
.booleanConf
149-
.createWithDefault(UserGroupInformation.isSecurityEnabled)
150+
.createWithDefault(false)
150151
}

kyuubi-ha/src/main/scala/org/apache/kyuubi/ha/client/zookeeper/ServiceDiscoveryClient.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import org.apache.kyuubi.ha.HighAvailabilityConf.HA_ZK_CONN_MAX_RETRY_WAIT
4646
import org.apache.kyuubi.ha.HighAvailabilityConf.HA_ZK_ENGINE_REF_ID
4747
import org.apache.kyuubi.ha.HighAvailabilityConf.HA_ZK_NAMESPACE
4848
import org.apache.kyuubi.ha.HighAvailabilityConf.HA_ZK_NODE_TIMEOUT
49-
import org.apache.kyuubi.ha.HighAvailabilityConf.HA_ZK_PUBLIST_CONFIGS
49+
import org.apache.kyuubi.ha.HighAvailabilityConf.HA_ZK_PUBLISH_CONFIGS
5050
import org.apache.kyuubi.ha.client.ServiceDiscovery
5151
import org.apache.kyuubi.ha.client.ZooKeeperClientProvider.buildZookeeperClient
5252
import org.apache.kyuubi.ha.client.zookeeper.ServiceDiscoveryClient.connectionChecker
@@ -187,7 +187,7 @@ object ServiceDiscoveryClient extends Logging {
187187
if (external) CreateMode.PERSISTENT_SEQUENTIAL
188188
else CreateMode.EPHEMERAL_SEQUENTIAL
189189
val znodeData =
190-
if (conf.get(HA_ZK_PUBLIST_CONFIGS) && session.isEmpty) {
190+
if (conf.get(HA_ZK_PUBLISH_CONFIGS) && session.isEmpty) {
191191
addConfsToPublish(conf, instance)
192192
} else {
193193
instance

0 commit comments

Comments
 (0)