2

I'm trying to run the sample word count program for Hadoop in Windows thru Cygwin. I've installed Hadoop and Cygwin.

I run the wordcount program using this statment:

$ bin/hadoop jar hadoop-examples-1.0.1.jar wordcount input output

I'm getting the following error:

12/05/08 23:05:35 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
12/05/08 23:05:35 ERROR security.UserGroupInformation: PriviledgedActionException as:suresh cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-suresh\mapred\staging\suresh1005684431\.staging to 0700
java.io.IOException: Failed to set permissions of path: \tmp\hadoop-suresh\mapred\staging\suresh1005684431\.staging to 0700
        at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:682)
        at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:655)
        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(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1093)
        at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
        at org.apache.hadoop.examples.WordCount.main(WordCount.java:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
        at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
        at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

I've set the Cygwin bin path in path variable. Any help is appreciated.

Anuj Kulkarni
  • 2,261
  • 5
  • 32
  • 42
Suresh
  • 117
  • 1
  • 2
  • 7
  • possible duplicate of [problems running simple map-reduce hadoop examples in cygwin](http://stackoverflow.com/questions/9755508/problems-running-simple-map-reduce-hadoop-examples-in-cygwin) – Chris Shain May 09 '12 at 03:28
  • Please try the following link http://stackoverflow.com/a/19804468/1446276 – Abhijit Jun 01 '15 at 15:25

3 Answers3

2

This is a known issue with some versions of Hadoop (see https://issues.apache.org/jira/browse/HADOOP-7682 for the full discussion).

I had this problem with version 1.0.2, so I tried various other versions.

In the end I got it to work by going back to version 0.22.0

If you go back to version 0.22.0 you will need to make a couple of changes to the bin/hadoop-config.sh script:

  1. Change the line that sets up HADOOP_MAPRED_HOME to point the mapreduce directory instead of the mapred directory.
  2. Comment out all the code that sets the java.library.path for a native hadoop install.
tophatsteve
  • 984
  • 1
  • 9
  • 22
0

You should look at hadoop services for windows - a version of hadoop that was ported to windows.

currently it's in beta, but it's supposed to be released soon.

Ophir Yoktan
  • 8,149
  • 7
  • 58
  • 106
0

I've managed to get this working to the point where jobs are dispatched, tasks executed, and results compiled.

en.wikisource.org/wiki/User:Fkorning/Code/Hadoop-on-Cygwin

FKorning
  • 166
  • 2