deniskuzZ commented on code in PR #6024:
URL: https://github.com/apache/hive/pull/6024#discussion_r2285711378


##########
llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java:
##########
@@ -670,10 +674,19 @@ protected final synchronized PathChildrenCache 
ensureInstancesCache(
 
   public void start() throws IOException {
     if (zooKeeperClient != null) {
-      String principal = ZookeeperUtils.setupZookeeperAuth(
-          conf, saslLoginContextName, zkPrincipal, zkKeytab);
-      if (principal != null) {
-        userNameFromPrincipal = LlapUtil.getUserNameFromPrincipal(principal);
+      if (UserGroupInformation.isSecurityEnabled() &&
+          HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.HIVE_ZOOKEEPER_USE_KERBEROS)) {
+        if (saslLoginContextName != null) {

Review Comment:
   why not move this into `setZookeeperClientKerberosJaasConfig` ?



##########
llap-client/src/java/org/apache/hadoop/hive/registry/impl/ZkRegistryBase.java:
##########
@@ -670,10 +674,19 @@ protected final synchronized PathChildrenCache 
ensureInstancesCache(
 
   public void start() throws IOException {
     if (zooKeeperClient != null) {
-      String principal = ZookeeperUtils.setupZookeeperAuth(
-          conf, saslLoginContextName, zkPrincipal, zkKeytab);
-      if (principal != null) {
-        userNameFromPrincipal = LlapUtil.getUserNameFromPrincipal(principal);
+      if (UserGroupInformation.isSecurityEnabled() &&
+          HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.HIVE_ZOOKEEPER_USE_KERBEROS)) {
+        if (saslLoginContextName != null) {

Review Comment:
   why not move this inside of `setZookeeperClientKerberosJaasConfig` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to