AclStatus (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.fs.permission, class: AclStatus

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.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `org.apache.hadoop.fs.permission.AclStatus.Builder`
  Builder for creating new Acl instances.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `FsAction`
  `getEffectivePermission(AclEntry entry)`
  Get the effective permission for the AclEntry
  `FsAction`
  `getEffectivePermission(AclEntry entry, FsPermission permArg)`
  Get the effective permission for the AclEntry.
  `List<AclEntry>`
  `getEntries()`
  Returns the list of all ACL entries, ordered by their natural ordering.
  `String`
  `getGroup()`
  Returns the file group.
  `String`
  `getOwner()`
  Returns the file owner.
  `FsPermission`
  `getPermission()`
  Returns the permission set for the path
  `int`
  `hashCode()`
  `boolean`
  `isStickyBit()`
  Returns the sticky bit.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## 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.