Hi ,
I want to output data from each Mapper , so I write the following code.

public static class Map extends MapReduceBase implements Mapper {
            private MultipleOutputs mos ;

             public void configure(JobConf job) {
                         mos = new MultipleOutputs(job);
             }

            mos.getCollector("hashtable", reporter).collect( new Text(
output_data )  , new Text(""));
            ...
}

I got hashtable-m-00000 ~ hahashtable-m-00009 files.

But when I looked into these files ,  they were all empty .

However , when I put MultipleOutputs in Reducer , it works!


Why ? Can Mapper use MultipleOutputs ?




-- 
Best wishes,
Johnson Chen

Reply via email to