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 [email protected] or file a JIRA ticket
with INFRA.
---