Failed to set permissions of path

Win7环境下经过Eclipse链接Hadoop1.2.1集群时,会遇到以下报错: 
Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Administrator\mapred\staging\Administrator-519341271\.staging to 0700java

此时只须要修改org.apache.hadoop.fs.FileUtil文件并从新编译便可,简单解决步骤以下:linux

1.到源码中拷贝src/core/org/apache/hadoop/fs/FileUtil.java文件,粘贴到eclipse工程目录下apache

4.找到如下部分,注释掉checkReturnValue方法中的代码eclipse

  private static void checkReturnValue(boolean rv, File p,oop

                                      FsPermission permissionspa

                                      ) throws IOException {orm

    /*ip

//win7 connect to linux hadoophadoop

if (!rv) {get

      throw new IOException("Failed to set permissions of path: " + p +

                            " to " +

                            String.format("%04o", permission.toShort()));

    }

*/

  }

5.hadoop-core-1.2.1.jar 解包

6.用上面更改的FileUtil.class(在工程输出目录)覆盖包里面的同文件

6.在dos上面从新打包,打包之替换原来拷贝下来hadoop目录里面的hadoop-core-1.2.1.jar

7.将包从新导入工程,把工程里面的包替换掉

 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop-hadoop/mapred/staging/hadoop-2103292795/.staging/job_local_0001

相关文章
相关标签/搜索