I am getting some error while running my MapReduce WordCount job.
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)