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); YarnConfiguration.DEFAULT_RM_ADMIN_PORT);
daemonUser = UserGroupInformation.getCurrentUser(); daemonUser = UserGroupInformation.getCurrentUser();
authorizer = YarnAuthorizationProvider.getInstance(conf); authorizer = YarnAuthorizationProvider.getInstance(conf);
authorizer.setAdmins(getAdminAclList(conf), UserGroupInformation authorizer.setAdmins(getAdminAclList(conf), daemonUser);
.getCurrentUser());
rmId = conf.get(YarnConfiguration.RM_HA_ID); rmId = conf.get(YarnConfiguration.RM_HA_ID);
isCentralizedNodeLabelConfiguration = isCentralizedNodeLabelConfiguration =
@ -542,8 +541,7 @@ private RefreshAdminAclsResponse refreshAdminAcls(boolean checkRMHAState)
Configuration conf = Configuration conf =
getConfiguration(new Configuration(false), getConfiguration(new Configuration(false),
YarnConfiguration.YARN_SITE_CONFIGURATION_FILE); YarnConfiguration.YARN_SITE_CONFIGURATION_FILE);
authorizer.setAdmins(getAdminAclList(conf), UserGroupInformation authorizer.setAdmins(getAdminAclList(conf), daemonUser);
.getCurrentUser());
RMAuditLogger.logSuccess(user.getShortUserName(), operation, RMAuditLogger.logSuccess(user.getShortUserName(), operation,
"AdminService"); "AdminService");