今天在做練習時候執行以下命令:
$ ./hadoop jar /mnt/hgfs/ShareFile/WordCountOne.jar /test/log/2015082818 /test/log/
其中主類打包時已指定,行程如下;
5004 Jps
4631 NodeManager
2746 NameNode
4526 ResourceManager
2981 SecondaryNameNode
2845 DataNode
3188 JobHistoryServer
2618 QuorumPeerMain
報錯內容如下
Exception in thread "main" java.lang.NumberFormatException: For input string: "/test/log/2015082818"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:481)
at java.lang.Integer.<init>(Integer.java:677)
at com.ibeifeng.firstMR.WordCount.main(WordCount.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
anyone who can solve the problem will be helpful,thanks!
uj5u.com熱心網友回復:
這個引數"/test/log/2015082818"是干嘛的,at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:481)
看起來好像是parseInt,轉整型的時候出錯的。
uj5u.com熱心網友回復:
這個引數"/test/log/2015082818 " 是要清洗的檔案和目錄 2015082818是檔案名 問題已解決,謝謝你的答復!轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/70407.html
標籤:Spark
上一篇:求CloudSim大神
下一篇:關于國際化通信的問題
