有人知道如何解决这个错误吗?我读到我可以在 fileutils.setPermission
并用 checkReturnValue
,但我不知道怎么做。
13/03/10 13:04:14 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13/03/10 13:04:14 ERROR security.UserGroupInformation: PriviledgedActionException as:Nesreen.Mamdouh cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Nesreen.Mamdouh\mapred\staging\Nesreen.Mamdouh64097525\.staging to 0700
Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Nesreen.Mamdouh\mapred\staging\Nesreen.Mamdouh64097525\.staging to 0700
at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:689)
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:856)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Unknown Source)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:824)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1261)
at BigDataPackage.WordCount.main(WordCount.java:55)
2条答案
按热度按时间sigwle7e1#
我相信你正在windows上运行这个程序。我相信这里也解决了类似的问题
请在此处查看有关windows hadoop安装的一些信息
o75abkj42#
您可以使用以下解决方法来抑制此错误:
在hadoop目录下,进入src->core->org->apache->hadoop->fs
打开fileutil.java
注解掉第685行checkreturnvalue函数中的代码。
重新创建hadoop-core-1.0.4.jar并将其包含在eclipse项目的构建路径中。
这应该能解决问题。