You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ae...@apache.org on 2017/07/27 23:48:34 UTC
[03/34] hadoop git commit: HADOOP-14659. UGI getShortUserName does
not need to search the Subject. Contributed by Daryn Sharp.
HADOOP-14659. UGI getShortUserName does not need to search the Subject. Contributed by Daryn Sharp.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b3269f7c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b3269f7c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b3269f7c
Branch: refs/heads/HDFS-7240
Commit: b3269f7cc119cbc51b16118b918f345f970804bc
Parents: c8df366
Author: Kihwal Lee <ki...@apache.org>
Authored: Thu Jul 20 16:12:21 2017 -0500
Committer: Kihwal Lee <ki...@apache.org>
Committed: Thu Jul 20 16:12:21 2017 -0500
----------------------------------------------------------------------
.../java/org/apache/hadoop/security/UserGroupInformation.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/b3269f7c/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
index 0510abd..e4d01a1 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java
@@ -1678,10 +1678,7 @@ public class UserGroupInformation {
* @return the user's name up to the first '/' or '@'.
*/
public String getShortUserName() {
- for (User p: subject.getPrincipals(User.class)) {
- return p.getShortName();
- }
- return null;
+ return user.getShortName();
}
public String getPrimaryGroupName() throws IOException {
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org