Hadoop Failed to set permissions of path
来源:互联网 发布:217淘宝站外平台哪个好 编辑:程序博客网 时间:2024/05/18 20:07
Eclipse里面写了个测试程序:把HDFS中的数据批量导入到HBase中
写好后,在本地测试遇到了如下问题:
14/04/21 16:49:53 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/04/21 16:49:53 ERROR security.UserGroupInformation: PriviledgedActionException as:admin cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-admin\mapred\staging\admin-1518427785\.staging to 0700
Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-admin\mapred\staging\admin-1518427785\.staging to 0700
at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:690)
at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:662)
at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:509)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:344)
at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:189)
at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:116)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:918)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1149)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:912)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
at com.plocc.hadoop.hbase.BatchImport.main(BatchImport.java:104)
此时我把程序打包到Linux上运行是okey的,那说明是Windows下文件权限问题,
然后根据at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:690)这个错误信息找到了源码,
然后一步步调试到Win32FileSystem.class中的
public native boolean setPermission(File f, int access, boolean enable, boolean owneronly);方法,
这个native格式的方法可能在c或者c++里面调用了,没法继续跟踪了,所以我这里的解决方法是把
private static void checkReturnValue(boolean rv, File p,
FsPermission permission
) throws IOException {
if (!rv) {
throw new IOException("Failed to set permissions of path: " + p +
" to " +
String.format("%04o", permission.toShort()));
}
}
标记经色部分的代码先注释掉,保证在windows下测试通过。
- hadoop Failed to set permissions of path:
- Hadoop Failed to set permissions of path
- Hadoop Failed to set permissions of path
- Win7 eclipse Hadoop Failed to set permissions of path .
- Win7 eclipse Hadoop Failed to set permissions of path
- Win7 eclipse Hadoop Failed to set permissions of path
- windows hadoop HDFS Failed to set permissions of path
- Hadoop Failed to set permissions of path 错误处理
- Win7 eclipse Hadoop Failed to set permissions of path
- Hadoop 出现 Failed to set permissions of path 的原因
- Win7 eclipse Hadoop Failed to set permissions of path
- Win7 eclipse Hadoop Failed to set permissions of path
- Hadoop Failed to set permissions of path 错误处理
- Hadoop Failed to set permissions of path 错误处理
- Failed to set permissions of path:
- hadoop学习笔记(4)-Windows7 eclipse Hadoop Failed to set permissions of path
- Failed to set permissions of path:\tmp\hadoop-yth\mapred\staging\yth-2036315919\.staging to 0700
- 异常eclipse Hadoop Failed to set permissions of path的解决
- FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate org.apache.解决办法
- Failed to list databases
- Failed to set permissions of path:\tmp\hadoop-yth\mapred\staging\yth-2036315919\.staging to 0700
- HMaster启动后自动关闭
- 【bzoj1468】【Tree】【点分治】
- Hadoop Failed to set permissions of path
- 【PA2015】【BZOJ4291】Kieszonkowe
- Hadoop name -format后Incompatible namespaceIDS 错误解决办法
- Hadoop 报错be replicated to 0 nodes, instead of 1
- java多态的理解
- Hadoop常见问题及解决办法
- Hive安装配置详解
- cf 582A GCD Table
- Hive出现异常 FAILED: Error In Metadata: Java.Lang.RuntimeException: Unable To Instantiate Org.Apache.Had