hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvasu...@apache.org
Subject [08/50] [abbrv] hadoop git commit: YARN-6271. yarn rmadin -getGroups returns information from standby RM. Contributed by Jian He.
Date Wed, 08 Mar 2017 10:47:35 GMT
YARN-6271. yarn rmadin -getGroups returns information from standby RM. Contributed by Jian
He.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8db7a8c3
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8db7a8c3
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8db7a8c3

Branch: refs/heads/YARN-3926
Commit: 8db7a8c3aea3d989361f32cca5b271e9653773b6
Parents: ac5ae00
Author: Junping Du <junping_du@apache.org>
Authored: Fri Mar 3 14:39:31 2017 -0800
Committer: Junping Du <junping_du@apache.org>
Committed: Fri Mar 3 14:39:31 2017 -0800

----------------------------------------------------------------------
 .../hadoop/yarn/server/resourcemanager/AdminService.java    | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/8db7a8c3/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/AdminService.java
----------------------------------------------------------------------
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 9dda57e..bcf7309 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
@@ -572,6 +572,15 @@ public class AdminService extends CompositeService implements
 
   @Override
   public String[] getGroupsForUser(String user) throws IOException {
+    String operation = "getGroupsForUser";
+    UserGroupInformation ugi;
+    try {
+      ugi = checkAcls(operation);
+    } catch (YarnException e) {
+      // The interface is from hadoop-common which does not accept YarnException
+      throw new IOException(e);
+    }
+    checkRMStatus(ugi.getShortUserName(), operation, "get groups for user");
     return UserGroupInformation.createRemoteUser(user).getGroupNames();
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message