Package org.apache.hadoop.fs.permission
Class AclStatus
java.lang.Object
org.apache.hadoop.fs.permission.AclStatus
An AclStatus contains the ACL information of a specific file. AclStatus
instances are immutable. Use a
AclStatus.Builder to create a new instance.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classorg.apache.hadoop.fs.permission.AclStatus.BuilderBuilder for creating new Acl instances. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetEffectivePermission(AclEntry entry) Get the effective permission for the AclEntrygetEffectivePermission(AclEntry entry, FsPermission permArg) Get the effective permission for the AclEntry.Returns the list of all ACL entries, ordered by their natural ordering.getGroup()Returns the file group.getOwner()Returns the file owner.Returns the permission set for the pathinthashCode()booleanReturns the sticky bit.toString()
-
Method Details
-
getOwner
Returns the file owner.- Returns:
- String file owner
-
getGroup
Returns the file group.- Returns:
- String file group
-
isStickyBit
public boolean isStickyBit()Returns the sticky bit.- Returns:
- boolean sticky bit
-
getEntries
Returns the list of all ACL entries, ordered by their natural ordering.- Returns:
- List<AclEntry> unmodifiable ordered list of all ACL entries
-
getPermission
Returns the permission set for the path- Returns:
FsPermissionfor the path
-
equals
-
hashCode
public int hashCode() -
toString
-
getEffectivePermission
Get the effective permission for the AclEntry- Parameters:
entry- AclEntry to get the effective action- Returns:
- FsAction.
-
getEffectivePermission
public FsAction getEffectivePermission(AclEntry entry, FsPermission permArg) throws IllegalArgumentException Get the effective permission for the AclEntry.
Recommended to use this API ONLY if client communicates with the old NameNode, needs to pass the Permission for the path to get effective permission, else usegetEffectivePermission(AclEntry).- Parameters:
entry- AclEntry to get the effective actionpermArg- Permission for the path. However if the client is NOT communicating with old namenode, then this argument will not have any preference.- Returns:
- Returns the effective permission for the entry.
- Throws:
IllegalArgumentException- If the client communicating with old namenode and permission is not passed as an argument.
-