I'm writing a Map-Reduce job on Hadoop and i've run into something pretty peculiar that i cant seem to figure out. For some reason the OutputCollector object is not what i'm expecting it to be in the reducer. I declared the reducer as such:

public void reduce(Text key, Iterator<MapWritable> values, OutputCollector<Text, Text> output, Reporter reporter)

However, when stepping through the code, the actual OutputCollector object i'm given is of type OutputCollector<Text, MapWritable>. It throws an error saying:

java.io.IOException: wrong value class: org.apache.hadoop.io.Text is not class org.apache.hadoop.io.MapWritable

Does anyone know why this would happen? The signature for my mapper is below which may give some hints:

public void map(Text key, ThriftWritable value, OutputCollector<Text, MapWritable> output, Reporter reporter)

ThriftWritable is an input format we've created in house.

Any help would be greatly appreciated.

- Manish
Co-Founder Rapleaf.com
http://www.rapleaf.com/pub/Manish-Shah

Reply via email to