Repository: hive
Updated Branches:
  refs/heads/master b02012f62 -> ce2754daf


Revert "HIVE-20118: SessionStateUserAuthenticator.getGroupNames() is always 
empty (Daniel Dai, reviewed by Thejas Nair)"

This reverts commit b02012f6282094b2af2d66ec1973da6082fa48d8.


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/ce2754da
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/ce2754da
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/ce2754da

Branch: refs/heads/master
Commit: ce2754daf0e33fd9787eaeaeaa0472c73637ad97
Parents: b02012f
Author: Jesus Camacho Rodriguez <jcama...@apache.org>
Authored: Fri Aug 3 17:49:34 2018 -0700
Committer: Jesus Camacho Rodriguez <jcama...@apache.org>
Committed: Fri Aug 3 17:49:34 2018 -0700

----------------------------------------------------------------------
 .../hive/ql/security/SessionStateUserAuthenticator.java       | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/ce2754da/ql/src/java/org/apache/hadoop/hive/ql/security/SessionStateUserAuthenticator.java
----------------------------------------------------------------------
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/security/SessionStateUserAuthenticator.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/security/SessionStateUserAuthenticator.java
index 1ded295..3bf990a 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/security/SessionStateUserAuthenticator.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/security/SessionStateUserAuthenticator.java
@@ -24,7 +24,6 @@ import java.util.List;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.session.SessionState;
-import org.apache.hadoop.security.UserGroupInformation;
 
 /**
  * Authenticator that returns the userName set in SessionState. For use when 
authorizing with HS2
@@ -36,14 +35,10 @@ public class SessionStateUserAuthenticator implements 
HiveAuthenticationProvider
 
   protected Configuration conf;
   private SessionState sessionState;
-  private List<String> groups;
 
   @Override
   public List<String> getGroupNames() {
-    if (groups == null) {
-      groups = 
UserGroupInformation.createRemoteUser(sessionState.getUserName()).getGroups();
-    }
-    return groups;
+    return groupNames;
   }
 
   @Override

Reply via email to