出错提示
[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