Hadoop错误一的解决猜测

如果出现:
java.lang.NullPointerException
at org.apache.hadoop.io.serializer.SerializationFactory.getSerializer(SerializationFactory.java:73)
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.(MapTask.java:759)
at org.apache.hadoop.mapred.MapTask$NewOutputCollector.(MapTask.java:487)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:575)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)

据我测试,很可能是因为job.setOutputValueClass(X.class);这里出了问题,因为X必需是实现了Writable接口
API中说到:Any key or value type in the Hadoop Map-Reduce * framework implements this interface.

你可能感兴趣的:(hadoop)