HADOOP-14659. UGI getShortUserName does not need to search the Subject. Contributed by Daryn Sharp.
(cherry picked from commit b3269f7cc1
)
This commit is contained in:
parent
e76e7b9f0b
commit
a735916b2c
|
@ -1602,10 +1602,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 {
|
||||
|
|
Loading…
Reference in New Issue