1)在windows下使用hadoop-eclipse插件开发MR程序,运行run on hadoop 时,若出现以下问题:
WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
Exception in thread "main" java.io.IOException: Cannot run program "chmod": CreateProcess error=2, ?t?Χ??????
at java.lang.ProcessBuilder.start(Unknown Source)
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.mapred.JobClient.submitJob(JobClient.java:730)
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1249)
at test.WordCount.main(WordCount.java:58)
Caused by: java.io.IOException: CreateProcess error=2, ?t?Χ??????
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
这时就需要下载安装cygwin,然后把其下bin加入到环境变量中,这样便可以解决这个问题。
2)如果配置hadoop-eclipse插件成功,但是却看不到run on hadoop,首先该想到的是插件版本的问题,不要用hadoop自带的,自己在网上下载一个;另外,重装插件之后重启Eclipse后还是没有看到run on hadoop,则这时需要先Java Application,然后再执行run on hadoop。自此这个问题得以解决!
阅读(2843) | 评论(0) | 转发(0) |