Package org.apache.hadoop.fs.permission

Class AclStatus

java.lang.Object
org.apache.hadoop.fs.permission.AclStatus

@Public @Stable public class AclStatus extends Object
An AclStatus contains the ACL information of a specific file. AclStatus instances are immutable. Use a AclStatus.Builder to create a new instance.
  • Method Details

    • getOwner

      public String getOwner()
      Returns the file owner.
      Returns:
      String file owner
    • getGroup

      public String getGroup()
      Returns the file group.
      Returns:
      String file group
    • isStickyBit

      public boolean isStickyBit()
      Returns the sticky bit.
      Returns:
      boolean sticky bit
    • getEntries

      public List<AclEntry> getEntries()
      Returns the list of all ACL entries, ordered by their natural ordering.
      Returns:
      List<AclEntry> unmodifiable ordered list of all ACL entries
    • getPermission

      public FsPermission getPermission()
      Returns the permission set for the path
      Returns:
      FsPermission for the path
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEffectivePermission

      public FsAction getEffectivePermission(AclEntry entry)
      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 use getEffectivePermission(AclEntry).
      Parameters:
      entry - AclEntry to get the effective action
      permArg - 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.