清洗数据写好代码后,运行报错:
ERROR org.apache.hadoop.mapred.TaskTracker: Can not start task tracker because java.io.IOException: Failed to set permissions of path: \tmp\hadoop-****** to 0700
at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:682)
at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:655)
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.mapred.TaskTracker.initialize(TaskTracker.java:719)
at org.apache.hadoop.mapred.TaskTracker.(TaskTracker.java:1436)
at org.apache.hadoop.mapred.TaskTracker.main(TaskTracker.java:3694)
eclipse运行作业 Failed to set permissions of path: \tmp\hadoop-admin\mapred\staging\Administrator-1506477061\.staging to 0700:Windows环境下的Hadoop TaskTracker无法正常启动 包括0.20.204、0.20.205、1.0.0版本
很多人采用修改FileUtil类 checkReturnValue方法代码,重新编译,替换原来的hadoop-core-1.0.0.jar文件,来解决。
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()));
}
}
我自己没有编译直接从网上下载个编译好的:
阅读(2673) | 评论(0) | 转发(0) |