运行mapreduce遇到的错:
Java.lang.ClassCastException: classcom.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$Text
atjava.lang.Class.asSubclass(Unknown Source)
atorg.apache.Hadoop.mapred.JobConf.getOutputKeyComparator(JobConf.java:774)
atorg.apache.hadoop.mapred.MapTask$MapOutputBuffer.<init>(MapTask.java:959)
atorg.apache.hadoop.mapred.MapTask$NewOutputCollector.<init>(MapTask.java:674)
atorg.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:756)
atorg.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
atorg.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:214)
14/02/26 14:37:30 INFOmapred.JobClient: map 0% reduce 0%
14/02/26 14:37:30 INFOmapred.JobClient: Job complete: job_local_0001
14/02/26 14:37:30 INFO mapred.JobClient:Counters: 0
弄了半天原来是Text的包导错了
不是:import com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider.Text;
而是:import org.apache.hadoop.io.Text;
That is lucky for this blog:
http://blog.csdn.net/zwx19921215/article/details/19978969