YARN-4998. Minor cleanup to UGI use in AdminService. (Daniel Templeton via kasha)

This commit is contained in:
Karthik Kambatla 2016-10-31 16:02:50 -07:00
parent 07ab89e8bb
commit 733aa99313

View File

@ -154,8 +154,7 @@ public void serviceInit(Configuration conf) throws Exception {
YarnConfiguration.DEFAULT_RM_ADMIN_PORT);
daemonUser = UserGroupInformation.getCurrentUser();
authorizer = YarnAuthorizationProvider.getInstance(conf);
authorizer.setAdmins(getAdminAclList(conf), UserGroupInformation
.getCurrentUser());
authorizer.setAdmins(getAdminAclList(conf), daemonUser);
rmId = conf.get(YarnConfiguration.RM_HA_ID);
isCentralizedNodeLabelConfiguration =
@ -542,8 +541,7 @@ private RefreshAdminAclsResponse refreshAdminAcls(boolean checkRMHAState)
Configuration conf =
getConfiguration(new Configuration(false),
YarnConfiguration.YARN_SITE_CONFIGURATION_FILE);
authorizer.setAdmins(getAdminAclList(conf), UserGroupInformation
.getCurrentUser());
authorizer.setAdmins(getAdminAclList(conf), daemonUser);
RMAuditLogger.logSuccess(user.getShortUserName(), operation,
"AdminService");