在Windows-7 64位上运行hadoop [英] running hadoop on Windows-7 64 bit
问题描述
我正在Windows-7 64位上运行hadoop并收到此错误:
I am running hadoop on windows-7 64 bit and getting this error:
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/包/io/howtofixhadoop.html .我安装了最新版本的cygwin,但是我不知道如何设置环境变量,因为我可以在该页面上cygwin安装目录中的任何位置找到cygwin-chmod.我该如何设置此变量以及运行该程序的其他配置.
Solution of this problem is given here http://javaprotlib.sourceforge.net/packages/io/howtofixhadoop.html. I installed latest version of cygwin but I don't know how to set environment variable because I can find cygwin-chmod any where in cygwin installed directory as mentioned on that page. How do I set this variable and what are the other configuration to run the program.
推荐答案
将系统路径变量设置为chmod.exe的位置 如果您已使用Windows Installer安装了cygwin64,则chmod.exe应该存在于
Set the System Path Variable to the location of chmod.exe If you have installed cygwin64 using windows installer then your chmod.exe should exist under
INSTALLATION_DIR\cygwin64\bin
对我来说,我已经在cy盘中安装了cygwin,所以我的系统路径变量的值是;C:\cygwin64\bin
For me, I have installed cygwin in my C drive, so the value of my System Path Variable is ;C:\cygwin64\bin
这篇关于在Windows-7 64位上运行hadoop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!