2013-06-28 22 views
0

我在窗口安裝了Cygwin運行,並配置就可以了hadoop0.20.0成立,我能夠成功運行在Eclipse中字數項目,但是當我運行該單詞計數在hadoop- * - example.jar,它引發以下錯誤的Hadoop - MapReduce工作無法在Windows(Cygwin的)

3/06/28 07:32:51 INFO input.FileInputFormat: Total input paths to process : 1 
13/06/28 07:32:52 INFO mapred.JobClient: Running job: job_201306280622_0002 
13/06/28 07:32:53 INFO mapred.JobClient: map 0% reduce 0% 
13/06/28 07:32:57 INFO mapred.JobClient: Task Id : attempt_201306280622_0002_m_000002_0, Status : FAILED 
Error initializing attempt_201306280622_0002_m_000002_0: 
org.apache.hadoop.util.Shell$ExitCodeException: //job.jar: invalid mode: `jar' 
Try `//job.jar --help' for more information. 

    at org.apache.hadoop.util.Shell.runCommand(Shell.java:195) 
    at org.apache.hadoop.util.Shell.run(Shell.java:134) 
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java: 286) 

會是什麼問題,PLZ assit

+0

什麼是你要運行的命令罐子? – twid

+0

@twid,斌/ Hadoop的罐子的Hadoop-0.20.0-examples.jar單詞計數/用戶/輸入/用戶/輸出 – Jeevanantham

回答

0

你的命令看起來好像沒什麼問題。嘗試給文件名輸入路徑。我希望這能解決你的問題。

bin/hadoop jar hadoop-0.20.0-examples.jar wordcount /user/input/input_file.txt /user/output 
+0

但其不正確的觀點正確,因爲如果我們需要處理一堆文件方式,提每個文件名是很大的工作。 – Jeevanantham