2013-06-30 106 views
0

運行的Hadoop我在windows-7 64位運行Hadoop和收到此錯誤:這個問題的在窗口7 64位

Exception in thread "main" java.io.IOException: Cannot run program "chmod": CreateProcess error=2, The system cannot find the file specified 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) 
    at org.apache.hadoop.util.Shell.runCommand(Shell.java:149) 
    at org.apache.hadoop.util.Shell.run(Shell.java:134) 
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:286) 
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:354) 
    at org.apache.hadoop.util.Shell.execCommand(Shell.java:337) 
    at org.apache.hadoop.fs.RawLocalFileSystem.execCommand(RawLocalFileSystem.java:481) 
    at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:473) 
    at org.apache.hadoop.fs.FilterFileSystem.setPermission(FilterFileSystem.java:280) 
    at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:266) 
    at org.apache.hadoop.mapred.JobClient.configureCommandLineOptions(JobClient.java:573) 
    at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:761) 
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:432) 
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447) 
    at finanalytics.ClassifyMR$MapClass.main(ClassifyMR.java:172) 
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified 
    at java.lang.ProcessImpl.create(Native Method) 
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:188) 
    at java.lang.ProcessImpl.start(ProcessImpl.java:132) 
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021) 
    ... 14 more 

的解決方案是在這裏http://javaprotlib.sourceforge.net/packages/io/howtofixhadoop.html給出。我安裝了最新版本的cygwin,但我不知道如何設置環境變量,因爲我可以在該頁面上提到的cygwin-chmod中找到cygwin安裝目錄中的任何位置。如何設置該變量以及運行該程序的其他配置是什麼。

+0

請參閱http://sourceforge.net/p/win-hadoop/wiki/Hadoop-on-Cygwin/ – devnull

回答

2

在我的C設置系統路徑變量chmod.exe 的位置,如果您已經安裝使用Windows Installer cygwin64那麼你應該chmod.exe下

INSTALLATION_DIR\cygwin64\bin 

對於我的存在,我已經安裝了Cygwin驅動器,所以我的系統路徑變量的值是;C:\cygwin64\bin