tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject git commit: TEZ-1683. Do ugi::getGroups only when necessary when checking ACLs. (hitesh)
Date Sat, 18 Oct 2014 16:35:36 GMT
Repository: tez
Updated Branches:
  refs/heads/master 9220170dd -> 83b0c3db9


TEZ-1683. Do ugi::getGroups only when necessary when checking ACLs. (hitesh)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/83b0c3db
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/83b0c3db
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/83b0c3db

Branch: refs/heads/master
Commit: 83b0c3db9777dc4ebe76963571d4be4ce6985873
Parents: 9220170
Author: Hitesh Shah <hitesh@apache.org>
Authored: Sat Oct 18 09:35:15 2014 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Sat Oct 18 09:35:15 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                                     | 1 +
 .../main/java/org/apache/tez/common/security/ACLManager.java    | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/83b0c3db/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index f204057..a1d8f9d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -41,6 +41,7 @@ ALL CHANGES:
   TEZ-1633. Fixed expected values in TestTaskRecovery.testRecovery_OneTAStarted.
   TEZ-1669. yarn-swimlanes.sh throws error post TEZ-1556.
   TEZ-1682. Tez AM hangs at times when there are task failures.
+  TEZ-1683. Do ugi::getGroups only when necessary when checking ACLs.
 
 Release 0.5.1: 2014-10-02
 

http://git-wip-us.apache.org/repos/asf/tez/blob/83b0c3db/tez-api/src/main/java/org/apache/tez/common/security/ACLManager.java
----------------------------------------------------------------------
diff --git a/tez-api/src/main/java/org/apache/tez/common/security/ACLManager.java b/tez-api/src/main/java/org/apache/tez/common/security/ACLManager.java
index 77ab065..f83678b 100644
--- a/tez-api/src/main/java/org/apache/tez/common/security/ACLManager.java
+++ b/tez-api/src/main/java/org/apache/tez/common/security/ACLManager.java
@@ -101,12 +101,9 @@ public class ACLManager {
     }
 
     String user = ugi.getShortUserName();
-    Collection<String> userGroups = Arrays.asList(ugi.getGroupNames());
-
     if (amUser.equals(user)) {
       return true;
     }
-
     if (EnumSet.of(ACLType.DAG_MODIFY_ACL, ACLType.DAG_VIEW_ACL).contains(aclType)) {
       if (dagUser != null && dagUser.equals(user)) {
         return true;
@@ -123,6 +120,8 @@ public class ACLManager {
         }
       }
     }
+
+    Collection<String> userGroups = Arrays.asList(ugi.getGroupNames());
     if (userGroups != null && !userGroups.isEmpty()
         && groups != null && !groups.isEmpty()) {
       Set<String> set = groups.get(aclType);


Mime
View raw message