Package alluxio.underfs.hdfs
Interface HdfsAclProvider
-
- All Known Implementing Classes:
NoopHdfsAclProvider
,SupportedHdfsAclProvider
public interface HdfsAclProvider
Interface for providing HDFS ACLs.
-
-
Method Summary
All Methods Instance Methods Abstract 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 theAccessControlList
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.
-
-
-
Method Detail
-
getAcl
@Nullable 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
Returns theAccessControlList
from an hdfs path.- Parameters:
hdfs
- the HDFS clientpath
- the path to retrieve the ACL for- Returns:
- a Pair object containing the
AccessControlList
representation and theDefaultAccessControlList
representation or null if ACL is unsupported/disabled - Throws:
java.io.IOException
- if ACL is supported but cannot be retrieved
-
setAclEntries
void setAclEntries(org.apache.hadoop.fs.FileSystem hdfs, java.lang.String path, java.util.List<alluxio.security.authorization.AclEntry> aclEntries) throws java.io.IOException
Sets the ACL and default ACL for an hdfs path using ACL entries.- Parameters:
hdfs
- the HDFS clientpath
- the path to set the ACL entries foraclEntries
- list of AclEntries, could be a representation ofAccessControlList
orDefaultAccessControlList
- Throws:
java.io.IOException
- if ACL can not be set
-
-