hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinayakum...@apache.org
Subject [1/3] hadoop git commit: HADOOP-12776. Remove getaclstatus call for non-acl commands in getfacl. (Contributed by Brahma Reddy Battula)
Date Fri, 12 Feb 2016 06:27:53 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 7f1d18fec -> 488e6cbe1
  refs/heads/branch-2.8 58d4c045e -> 26934cf6c
  refs/heads/trunk 9b959f3ee -> c78740a97


HADOOP-12776. Remove getaclstatus call for non-acl commands in getfacl. (Contributed by Brahma
Reddy Battula)


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

Branch: refs/heads/trunk
Commit: c78740a979c1b434c6595b302bd376fc3d432509
Parents: 9b959f3
Author: Vinayakumar B <vinayakumarb@apache.org>
Authored: Fri Feb 12 11:53:28 2016 +0530
Committer: Vinayakumar B <vinayakumarb@apache.org>
Committed: Fri Feb 12 11:53:28 2016 +0530

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt         |  3 +++
 .../java/org/apache/hadoop/fs/shell/AclCommands.java    | 12 +++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c78740a9/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index fe71564..e7974eb 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -1120,6 +1120,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12699. TestKMS#testKMSProvider intermittently fails during
     'test rollover draining'. (Xiao Chen via wang)
 
+    HADOOP-12776. Remove getaclstatus call for non-acl commands in getfacl.
+    (Brahma Reddy Battula via vinayakumarb)
+
   OPTIMIZATIONS
 
     HADOOP-11785. Reduce the number of listStatus operation in distcp

http://git-wip-us.apache.org/repos/asf/hadoop/blob/c78740a9/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/AclCommands.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/AclCommands.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/AclCommands.java
index d139eba..42829bf 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/AclCommands.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/AclCommands.java
@@ -86,9 +86,15 @@ class AclCommands extends FsCommand {
           (perm.getOtherAction().implies(FsAction.EXECUTE) ? "t" : "T"));
       }
 
-      AclStatus aclStatus = item.fs.getAclStatus(item.path);
-      List<AclEntry> entries = perm.getAclBit() ? aclStatus.getEntries()
-          : Collections.<AclEntry> emptyList();
+      AclStatus aclStatus = null;
+      List<AclEntry> entries = null;
+      if (perm.getAclBit()) {
+        aclStatus = item.fs.getAclStatus(item.path);
+        entries = aclStatus.getEntries();
+      } else {
+        aclStatus = null;
+        entries = Collections.<AclEntry> emptyList();
+      }
       ScopedAclEntries scopedEntries = new ScopedAclEntries(
         AclUtil.getAclFromPermAndEntries(perm, entries));
       printAclEntriesForSingleScope(aclStatus, perm,


Mime
View raw message