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 Rong-en Fan <gr...@gmail.com> on 2009/08/10 05:26:54 UTC
MultipleOutputFormat and key class
Hi,
I'm playing with MultipleOutputFormat in 0.19.2. However, it seems to
me that I can not change key class in MOF. For example, my Map outputs
<Text, Text> but in the end, I want to store <LongWritable, Text>. The
reason that Map outputs Text as key is to encode information for MOF.
In my MOF class I use
public class MyMOF<K,V> extends MOF<K,V>
{
public LongWritable generateActualKey(Key, Value)
{
return LongWritable(...)
}
}
But it seems somehow this method is not used and mapred complains my
final key is not a class of LongWritable (I did
JobConf.setOutputKeyClass(LongWritable.class)).
Any idea?
Thanks,
Rong-En Fan