ERROR security.UserGroupInformation: PriviledgedActionException

今天在Eclipse上测试代码时遇到:

15/03/15 21:06:02 ERROR security.UserGroupInformation: PriviledgedActionException as:hadoop cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-hadoop\mapred\staging\hadoop254676024\.staging to 0700 
java.io.IOException: Failed to set permissions of path: \tmp\hadoop
-hadoop\mapred\staging\hadoop254676024\.staging to 0700 at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:682) at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:655)

看了报错信息是因为hadoop-1.x源码org.apache.hadoop.fs.FileUtil类:

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()));
        }*/
  }
  

这一段代码抛出的异常。

为了方便在本地Eclipse上调试代码,只好简单地把hadoop-core-1.2.1.jar这个包的源码如上注释完,重新编译。

 

posted on 2015-03-15 21:57  gongice  阅读(1117)  评论(0编辑  收藏  举报

导航