HADOOP-14659. UGI getShortUserName does not need to search the Subject. Contributed by Daryn Sharp.
This commit is contained in:
parent
c8df3668ec
commit
b3269f7cc1
|
@ -1678,10 +1678,7 @@ public class UserGroupInformation {
|
||||||
* @return the user's name up to the first '/' or '@'.
|
* @return the user's name up to the first '/' or '@'.
|
||||||
*/
|
*/
|
||||||
public String getShortUserName() {
|
public String getShortUserName() {
|
||||||
for (User p: subject.getPrincipals(User.class)) {
|
return user.getShortName();
|
||||||
return p.getShortName();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrimaryGroupName() throws IOException {
|
public String getPrimaryGroupName() throws IOException {
|
||||||
|
|
Loading…
Reference in New Issue