Hadoop集群运行wordcount jar包出错

出错提示

[xiaoqiu@s151 /home/xiaoqiu]$ hadoop jar HDFSTest.jar com.cr.hdfs.wordcount1.wordcountAPP hdfs:                 //s150/usr/xiaoqiu/wordcount hdfs://s150/usr/xiaoqiu/wordcount/output
Exception in thread "main" java.lang.ClassNotFoundException: com.cr.hdfs.wordcount1.wordcountAP                 P
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:214)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

错误写法:
hadoop jar HDFSTest.jar com.cr.hdfs.wordcount1.wordcountAPP hdfs:                 //s150/usr/xiaoqiu/wordcount hdfs://s150/usr/xiaoqiu/wordcount/output

正确写法:

[xiaoqiu@s151 /home/xiaoqiu]$ hadoop jar HDFSTest.jar com.cr.hdfs.wordcount1 hdfs://s150/user/xiaoqiu/wordcount/wc.txt hdfs://s150/user/xiaoqiu/wordcount/output
这里我去掉了jobname :wordcountApp

posted @ 2018-01-02 11:31  crr121  阅读(120)  评论(0编辑  收藏  举报