hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fatih Haltas <fatih.hal...@nyu.edu>
Subject Multiple outputs
Date Tue, 12 Mar 2013 07:18:18 GMT
Hi Everyone,

I would like to have 2 different output (having different columns of a same
input text file.)
When I googled a bit, I got multipleoutputs classes, is this the common way
of doing it or is there any way to create context<iterable> kind of
things/is there context array/is it possible to have two different context
object as reducer output by changing the "public  void reduce(Text
key,Iterable<Text> values, Context context)" part as one more Context
context1, Context context2) ?

Any help will be appraciated.
Thank you very much.

Below is my reducer function, how should I modify it?

static class MyReducer extends Reducer<Text,Text,Text,Text>
         public  void reduce(Text key,Iterable<Text> values, Context
context) throws IOException,
                     Iterator<Text> iter = values.iterator();
                             Text externalip_starttime_endtime =
                             Text outValue = new
                             context.write(key, new Text(outValue));



View raw message