List of usage examples for org.apache.hadoop.fs.permission FsAction getFsAction
public static FsAction getFsAction(String permission)
From source file:alluxio.underfs.hdfs.acl.SupportedHdfsAclProvider.java
License:Apache License
private AclEntry getHdfsAclEntry(alluxio.security.authorization.AclEntry entry) throws IOException { AclEntry.Builder builder = new AclEntry.Builder(); // Do not set name for unnamed entries if (entry.getType() != alluxio.security.authorization.AclEntryType.OWNING_USER && entry.getType() != alluxio.security.authorization.AclEntryType.OWNING_GROUP) { builder.setName(entry.getSubject()); }//from w w w . j a v a2 s . c o m builder.setScope(entry.isDefault() ? AclEntryScope.DEFAULT : AclEntryScope.ACCESS); builder.setType(getHdfsAclEntryType(entry)); FsAction permission = FsAction.getFsAction(entry.getActions().toCliString()); builder.setPermission(permission); return builder.build(); }