You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Thamizhannal Paramasivam <th...@gmail.com> on 2012/01/27 19:09:15 UTC
reducer with MultipleTextOutputFormat issue
Hi All,
This is question regarding Hadoop-0.19 with MultipleTextOutputFormat. I am
using MyMultipleTextOutputFormat to write reducer output.
I am using 4 reducers. But, only one output of reducer's output has been
written into output file.
I have debugged this program by putting println() on reducer, it seems all
the reducer are getting <K,V> as expected and writing results to
worOutputCollector. But out of which one of the reducer result only been
written on output file.
Any suggestion would be appreciated. If I put reducer=1 then it is working
perfectly.
public class MyMultipleTextOutputFormat<K, V> extends
MultipleTextOutputFormat<K, V> {
@Override
protected String generateFileNameForKeyValue(K key, V value, String
name) {
String[] keys = key.toString().split("%");
if ( keys.length != 3 ) {
return key.toString();
}
//System.out.println("MultiKey:"+keys[2].toString());
return keys[2].toString();
}
Thanks,
Tamil