diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java index 33daf7f09b..c060659ddb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java @@ -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");