You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Dennis Kubes <nu...@dragonflymc.com> on 2006/05/30 20:21:46 UTC

Map output value different from Reduce Output value

How would I set the map output value class to be different from the 
reduce output value class.  I am trying the code below but it doesn't 
seem to work.  It throws an error saying WordWeights is not 
ObjectWritable where word weights is my final output value class.

...
    rovejob.setMapOutputValueClass(ObjectWritable.class);
    rovejob.setOutputFormat(MapFileOutputFormat.class);
    rovejob.setOutputKeyClass(UTF8.class);   
    rovejob.setOutputValueClass(WordWeights.class);

Dennis

Re: Map output value different from Reduce Output value

Posted by Dennis Kubes <nu...@dragonflymc.com>.
Let me rephrase my question.  Is there a way to have a different final 
output value when using MapOutputFormat?

Dennis Kubes wrote:
> How would I set the map output value class to be different from the 
> reduce output value class.  I am trying the code below but it doesn't 
> seem to work.  It throws an error saying WordWeights is not 
> ObjectWritable where word weights is my final output value class.
>
> ...
>    rovejob.setMapOutputValueClass(ObjectWritable.class);
>    rovejob.setOutputFormat(MapFileOutputFormat.class);
>    rovejob.setOutputKeyClass(UTF8.class);      
> rovejob.setOutputValueClass(WordWeights.class);
>
> Dennis