eclipse develop hadoop chmod :Cannot run program "chmod": CreateProces

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:56   1350   0

在window eclipse上测试hadoop 程序时,出现不能执行chmod问题。

需要安装cygwin程序:点击下载x64 cygwin

具体安装步骤,网上很多文章有介绍了。


错误如下:

15/04/19 14:41:29 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
15/04/19 14:41:29 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
Exception in thread "main" java.io.IOException: <strong><span style="color:#ff0000;background-color: rgb(255, 255, 255);">Cannot run program "chmod": CreateProcess error=2, ?????????</span></strong>
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
 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 com.billstudy.hdfs.WordCount.main(WordCount.java:51)
Caused by: java.io.IOException: CreateProcess error=2, ?????????
 at java.lang.ProcessImpl.create(Native Method)
 at java.lang.ProcessImpl.<init>(ProcessImpl.java:376)
 at java.lang.ProcessImpl.start(ProcessImpl.java:136)
 at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
 ... 14 more



解决问题步骤如下:

1.安装cygwin

2.将按照目录 cygwin安装目录/bin 设置到机器环境变量里面 , 和Java的环境配置类似。



分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP