【发布时间】:2017-02-02 11:06:21
【问题描述】:
下面sn-p中使用的fileSystem对象是通过org.apache.hadoop.fs.FileSystem.get(Configuration conf)获得的。
下面传递的FsPermission对象是通过FsPermission.getDefault()得到的,即777。
public int mkdirs(Path f, FsPermission permission) {
try {
return fileSystem.mkdirs(f, permission) ? 0 : 1;
} catch (IOException e) {
LOG.error("Failed to execute 'mkdirs': " + e.getMessage());
}
return 1;
}
但是,即使通过 777,创建的结果目录也具有 755 权限。
这里有什么问题?
【问题讨论】:
标签: hadoop hdfs cloudera hadoop2 hortonworks-data-platform