2011-07-29 232 views
4

我正在運行由hadoop提供的字數統計示例。下面是我得到的錯誤:在單節點羣集上運行Hadoop示例時出錯

-bash-4.1$ ./hadoop jar /home/chanders/Hadoop/bin/hadoop-examples-0.20.203.0.jar wordcount /usr/temp_hadoop /usr/output 
Warning: Maximum heap size rounded up to 1024 MB 
Warning: Maximum heap size rounded up to 1024 MB 
Exception in thread "main" java.io.IOException: Error opening job jar: /home/chanders/Hadoop/bin/hadoop-examples-0.20.203.0.jar 
    at org.apache.hadoop.util.RunJar.main(RunJar.java:90) 
Caused by: java.util.zip.ZipException: error in opening zip file 
    at java.util.zip.ZipFile.open(Native Method) 
    at java.util.zip.ZipFile.<init>(ZipFile.java:129) 
    at java.util.jar.JarFile.<init>(JarFile.java:141) 
    at java.util.jar.JarFile.<init>(JarFile.java:78) 
    at org.apache.hadoop.util.RunJar.main(RunJar.java:88) 
-bash-4.1$ ^C 
-bash-4.1$ ./hadoop jar /home/chanders/Hadoop/bin/hadoop*examples*.jar wordcount /usr/temp_hadoop /usr/output 
Warning: Maximum heap size rounded up to 1024 MB 
Warning: Maximum heap size rounded up to 1024 MB 
Exception in thread "main" java.io.IOException: Error opening job jar: /home/chanders/Hadoop/bin/hadoop*examples*.jar 
    at org.apache.hadoop.util.RunJar.main(RunJar.java:90) 
Caused by: java.util.zip.ZipException: error in opening zip file 
    at java.util.zip.ZipFile.open(Native Method) 
    at java.util.zip.ZipFile.<init>(ZipFile.java:129) 
    at java.util.jar.JarFile.<init>(JarFile.java:141) 
    at java.util.jar.JarFile.<init>(JarFile.java:78) 
    at org.apache.hadoop.util.RunJar.main(RunJar.java:88) 

約我安裝的信息:我跟着從Michaeal諾爾的鏈接Here 的安裝說明,唯一的變化是,我還沒有創建一個獨立的Hadoop的用戶。我在登錄時使用它。

+0

有史以來最愚蠢的錯誤。我爲jar文件提供的鏈接出錯。我知道了。謝謝 –

回答

6

該jar的路徑存在錯誤。我糾正了它。

4

一個常見的錯誤(見於其他論壇)是由於hadoop試圖運行jar文件的文件夾的權限問題。解決這個問題可以讓hadoop找到jar文件。

+0

,幫助。謝謝。 – AD14

相關問題