accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request #273: ACCUMULO-4665 Use UGI with real Kerberos credent...
Date Mon, 26 Jun 2017 20:24:15 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/273#discussion_r124110937
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/security/tokens/KerberosToken.java
---
    @@ -70,18 +71,12 @@ public KerberosToken(String principal) throws IOException {
        *          Should the current Hadoop user be replaced with this user
        */
       public KerberosToken(String principal, File keytab, boolean replaceCurrentUser) throws
IOException {
    -    requireNonNull(principal, "Principal was null");
    -    requireNonNull(keytab, "Keytab was null");
    +    this.principal = requireNonNull(principal, "Principal was null");
    +    this.keytab = requireNonNull(keytab, "Keytab was null");
         checkArgument(keytab.exists() && keytab.isFile(), "Keytab was not a normal
file");
    -    UserGroupInformation ugi;
         if (replaceCurrentUser) {
           UserGroupInformation.loginUserFromKeytab(principal, keytab.getAbsolutePath());
    -      ugi = UserGroupInformation.getCurrentUser();
    --- End diff --
    
    I don't understand UserGroupInformation.  Is it easy to explain why is this the wrong
thing to do?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message