運行java
[liujia@hadoopnode25232 ~]$ hadoop jar /user/zhx/MyTest.jar /user/zhx/test /user/zhx/1ooputnode
報錯:apache
Exception in thread "main" java.io.IOException: Error opening job jar: /user/zhx/MyTest.jaroop
at org.apache.hadoop.util.RunJar.main(RunJar.java:124)ip
Caused by: java.util.zip.ZipException: error in opening zip filehadoop
at java.util.zip.ZipFile.open(Native Method)it
at java.util.zip.ZipFile.<init>(ZipFile.java:127)io
at java.util.jar.JarFile.<init>(JarFile.java:135)thread
at java.util.jar.JarFile.<init>(JarFile.java:72)test
at org.apache.hadoop.util.RunJar.main(RunJar.java:122)
後來發現jar包路徑問題,我把jar複製到/user/zhx下 沒起做用,後來改爲原路徑
[liujia@hadoopnode25232 ~]$ hadoop jar /home/liujia/MyTest.jar /user/zhx/test /user/zhx/oooput
運行成功