Hello again,
I've created a custom Map output class, called Document (which inherits from
BinaryComparable), and set up my job the following way...
Job zoneJob = new Job(conf, "zone");
zoneJob.setJarByClass(ZoneMapper.class);
// extJars(conf);
zoneJob.setOutputKeyClass(Text.class);
zoneJob.setMapOutputValueClass(Document.class);
zoneJob.setOutputValueClass(Text.class);
zoneJob.setMapperClass(ZoneMapper.class);
zoneJob.setReducerClass(ZoneReducer.class);
zoneJob.setInputFormatClass(WholeFileInputFormat.class);
zoneJob.setOutputFormatClass(TextOutputFormat.class);
When I run I get the following exception...
09/10/21 09:42:49 INFO mapred.JobClient: Task Id :
attempt_200910191815_0009_m_000001_2, Status : FAILED
java.lang.NullPointerException
at
org.apache.hadoop.io.serializer.SerializationFactory.getSerializer(SerializationFactory.java:73)
at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.<init>(MapTask.java:759)
at
org.apache.hadoop.mapred.MapTask$NewOutputCollector.<init>(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)
I don't see a way to set the MapOutputValueFormat? I still want the final
output of the reducer to be TextOutputFormat so I left setOutputFormatClass as
TextOutputFormat.
Thanks,
Geoff