Class SupportedHdfsAclProvider

  • All Implemented Interfaces:
    HdfsAclProvider

    @ThreadSafe
    public class SupportedHdfsAclProvider
    extends java.lang.Object
    implements HdfsAclProvider
    Provides the HDFS ACLs. This is only supported in Hadoop versions 2.4 and greater.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      alluxio.collections.Pair<alluxio.security.authorization.AccessControlList,​alluxio.security.authorization.DefaultAccessControlList> getAcl​(org.apache.hadoop.fs.FileSystem hdfs, java.lang.String path)
      Returns the AccessControlList from an hdfs path.
      void setAclEntries​(org.apache.hadoop.fs.FileSystem hdfs, java.lang.String path, java.util.List<alluxio.security.authorization.AclEntry> aclEntries)
      Sets the ACL and default ACL for an hdfs path using ACL entries.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SupportedHdfsAclProvider

        public SupportedHdfsAclProvider()
    • Method Detail

      • getAcl

        public alluxio.collections.Pair<alluxio.security.authorization.AccessControlList,​alluxio.security.authorization.DefaultAccessControlList> getAcl​(org.apache.hadoop.fs.FileSystem hdfs,
                                                                                                                                                               java.lang.String path)
                                                                                                                                                        throws java.io.IOException
        Description copied from interface: HdfsAclProvider
        Returns the AccessControlList from an hdfs path.
        Specified by:
        getAcl in interface HdfsAclProvider
        Parameters:
        hdfs - the HDFS client
        path - the path to retrieve the ACL for
        Returns:
        a Pair object containing the AccessControlList representation and the DefaultAccessControlList representation or null if ACL is unsupported/disabled
        Throws:
        java.io.IOException - if ACL is supported but cannot be retrieved
      • setAclEntries

        public void setAclEntries​(org.apache.hadoop.fs.FileSystem hdfs,
                                  java.lang.String path,
                                  java.util.List<alluxio.security.authorization.AclEntry> aclEntries)
                           throws java.io.IOException
        Description copied from interface: HdfsAclProvider
        Sets the ACL and default ACL for an hdfs path using ACL entries.
        Specified by:
        setAclEntries in interface HdfsAclProvider
        Parameters:
        hdfs - the HDFS client
        path - the path to set the ACL entries for
        aclEntries - list of AclEntries, could be a representation of AccessControlList or DefaultAccessControlList
        Throws:
        java.io.IOException - if ACL can not be set