HADOOP-12776. Remove getaclstatus call for non-acl commands in getfacl. (Contributed by Brahma Reddy Battula)
(cherry picked from commitc78740a979
) (cherry picked from commit488e6cbe16
)
This commit is contained in:
parent
58d4c045e6
commit
26934cf6c7
|
@ -402,6 +402,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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue