本文整理汇总了Java中org.apache.hadoop.fs.permission.FsAction.READ_EXECUTE属性的典型用法代码示例。如果您正苦于以下问题:Java FsAction.READ_EXECUTE属性的具体用法?Java FsAction.READ_EXECUTE怎么用?Java FsAction.READ_EXECUTE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.fs.permission.FsAction
的用法示例。
在下文中一共展示了FsAction.READ_EXECUTE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: listStatus
@Override
public FileStatus[] listStatus(Path f) throws IOException {
FsPermission perm = new FsPermission(FsAction.ALL, FsAction.READ_EXECUTE,
FsAction.READ_EXECUTE);
Path path = new Path("/foo");
FileStatus stat = new FileStatus(1000, true, 3, 1000, 0, 0, perm, "owner",
"group", path);
return new FileStatus[] { stat };
}
示例2: getUpdateKeyPermissionTasks
private Collection<FsPermissionTask> getUpdateKeyPermissionTasks(DatasetConfig datasetConfig, FileSystemWrapper userFs) {
final FileUpdateKey fileUpdateKey = new FileUpdateKey();
ProtostuffIOUtil.mergeFrom(datasetConfig.getReadDefinition().getReadSignature().toByteArray(), fileUpdateKey, fileUpdateKey.getSchema());
if (fileUpdateKey.getCachedEntitiesList() == null || fileUpdateKey.getCachedEntitiesList().isEmpty()) {
return Collections.emptyList();
}
final List<FsPermissionTask> fsPermissionTasks = Lists.newArrayList();
final FsAction action;
final List<Path> batch = Lists.newArrayList();
//DX-7850 : remove once solution for maprfs is found
if (userFs.isMapRfs()) {
action = FsAction.READ;
} else {
action = FsAction.READ_EXECUTE;
}
for (FileSystemCachedEntity cachedEntity : fileUpdateKey.getCachedEntitiesList()) {
batch.add(new Path(cachedEntity.getPath()));
if (batch.size() == PERMISSION_CHECK_TASK_BATCH_SIZE) {
// make a copy of batch
fsPermissionTasks.add(new FsPermissionTask(userFs, Lists.newArrayList(batch), action));
batch.clear();
}
}
if (!batch.isEmpty()) {
fsPermissionTasks.add(new FsPermissionTask(userFs, batch, action));
}
return fsPermissionTasks;
}