Error description:
13/09/12 17:59:00 ERROR security. userGroupInformation: PriviledgedActionException as: leo cause: java. io. IOException: Failed to set permissions of path: \ tmp \ hadoop-leo \ mapred \ staging \ leo480143202 \. staging to 0700
Exception in thread "main" java. io. IOException: Failed to set permissions of path: \ tmp \ hadoop-leo \ mapred \ staging \ leo480143202 \. staging to 0700
At org. apache. hadoop. fs. FileUtil. checkReturnValue (FileUtil. java: 691)
At org. apache. hadoop. fs. FileUtil. setPermission (FileUtil. java: 664)
At org. apache. hadoop. fs. RawLocalFileSystem. setPermission (RawLocalFileSystem. java: 514)
At org. apache. hadoop. fs. RawLocalFileSystem. mkdirs (RawLocalFileSystem. java: 349)
At org. apache. hadoop. fs. FilterFileSystem. mkdirs (FilterFileSystem. java: 193)
See the https://issues.apache.org/jira/browse/HADOOP-7682 for the bug
Solution:
Modify the FileUtil class checkReturnValue method and put it in the hadoop-core.jar again,
The http://blog.csdn.net/java2000_wl/article/details/7598040 provides a hadoop-core-1.0.4.jar, but I use a hadoop-core-1.2.1.jar. So I extracted FileUtil. class from the jar above and replaced the file in the hadoop-core-1.2.1.jar.
Method of replacement: Open the hadoop-core.jar with 7-zip or other compression software, find the org \ apache \ hadoop \ fs directory, replace FileUtil. class with the file of the original jar package.
This method can be applied to multi-version hadoop-core.jar, just you need to start your own.
FileUtil. class
Hadoop-core-1.2.1.jar