1

有谁知道如何解决这个错误?我读过我可以用 编辑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)
4

2 回答 2

0

您可以使用以下解决方法来抑制此错误:

  1. 在您的 hadoop 目录下,转到 src->core->org->apache->hadoop->fs
  2. 打开 FileUtil.Java
  3. 在第 685 行注释掉 checkReturnValue 函数内的代码。
  4. 重新创建 hadoop-core-1.0.4.jar 并将其包含在 Eclipse 项目的构建路径中。

这应该可以解决问题。

于 2013-03-10T16:41:04.293 回答
0

我相信你在 Windows 上运行这个程序。我相信这里解决了类似的问题

在此处查看有关 Windows-hadoop 安装的一些信息

于 2013-03-10T12:23:24.523 回答