我在運行MapReduce WordCount作業時出現一些錯誤。FAILED錯誤:java.io.IOException:所有收集器的初始化失敗
Error: java.io.IOException: Initialization of all the collectors failed. Error in last collector was :class wordcount.wordmapper at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:414) at org.apache.hadoop.mapred.MapTask.access$100(MapTask.java:81) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) atorg.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1693)at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) Caused by: java.lang.ClassCastException: class wordcount.wordmapperat java.lang.Class.asSubclass(Class.java:3165)at org.apache.hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:892) at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.init(MapTask.java:1005) at org.apache.hadoop.mapred.MapTask.createSortingCollector(MapTask.java:402)
分享你的wordcount code –