我正在运行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 Noll链接Here的安装说明进行操作 唯一的变化是我没有创建一个单独的hadoop用户。我在登录时使用它。
答案 0 :(得分:6)
罐子的路径有误。我纠正了它。
答案 1 :(得分:4)
一个常见错误(在其他论坛上看到)是由于hadoop尝试运行jar文件的文件夹上的权限问题。修复此问题使hadoop能够找到jar文件。