Under Windows: Failed to set permissions of the path: \tmp\ \.staging to 0700

Source: Internet
Author: User

This official bug has been encountered before ............. But.......

==================================================

12/04/24 15:32:44 WARN util. nativecodeloader:unable to load Native-hadoop library for your platform ... using Builtin-java classes where applicable
12/04/24 15:32:44 ERROR security. Usergroupinformation:priviledgedactionexception As:administrator cause:java.io.IOException:Failed to set Permissions of Path: \tmp\hadoop-administrator\mapred\staging\administrator-519341271\.staging to 0700
Exception in thread "main" java.io.IOException:Failed to set permissions of path: \tmp\hadoop-administrator\mapred\s Taging\administrator-519341271\.staging to 0700

==========================================================================

This is the Windows file permissions issue, under Linux can run normally, there is no such a problem.

The workaround is to modify the/hadoop-1.0.2/src/core/org/apache/hadoop/fs/ Fileutil.java inside the Checkreturnvalue, commented out can (some rough, under the window, can not check)

......    private static void Checkreturnvalue (Boolean rv, File p,                                         fspermission permission                                         ) throws IOException {      /** i F (!RV) {throw new IOException ("Failed to set permissions of path:" + P + "to" + String.Format ("%04o", Permission.tosh ORT ())); } **/    }  

recompile the package Hadoop-core-1.0.2.jar, replacing the Hadoop-core-1.0.2.jar in the hadoop-1.0.2 root directory.

You can also copy the source of the ORG.APACHE.HADOOP.FS package to the project, and then modify the Fileutil.java in the Checkreturnvalue method to comment out the contents of the content can be

After replacing, refresh the project, set the correct jar dependency, and run Wordcounttest now.

====================================================================================

Official Bug Reference:

https://issues.apache.org/jira/browse/HADOOP-7682

Workaround:

1. Download and unzip http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-1.1.2/hadoop-1.1.2.tar.gz

2. Modify Hadoop-1.1.2\src\core\org\apache\hadoop\fs\fileutil.java, search Failed to set permissions of path, find 689 rows, throw new IOException Change to Log.warn

3, modify Hadoop-1.1.2\build.xml, search autoreconf, remove the matching 6 executable= "autoreconf" exec Configuration

4. Download and extract ant, add the bin directory under the Ant directory to the environment variable path

5. Switch to the hadoop-1.1.2 directory at the command line and execute the ant

6. Replace the Hadoop-core-1.0.3.jar with the newly generated Hadoop-1.1.2\build\hadoop-core-1.1.3-snapshot.jar

Under Windows: Failed to set permissions of the path: \tmp\ \.staging to 0700

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.