From 733aa993134ba324c712590fa92b8ef230b0839a Mon Sep 17 00:00:00 2001 From: Karthik Kambatla Date: Mon, 31 Oct 2016 16:02:50 -0700 Subject: [PATCH] YARN-4998. Minor cleanup to UGI use in AdminService. (Daniel Templeton via kasha) --- .../hadoop/yarn/server/resourcemanager/AdminService.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 33daf7f09bc..c060659ddb8 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 class AdminService extends CompositeService implements 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 @@ public class AdminService extends CompositeService implements 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");