hadoop - chainReducer notworking -
i used map1->reduce1->map2 sequence, not able map2 output. instead, reduce1 output. here driver code:
public static void main(string[] args) throws exception { configuration conf = new configuration(); conf.set("mapred.textoutputformat.separator",":"); job job = job.getinstance(conf, "lsh1"); configuration mymapper = new configuration(false); chainmapper.addmapper(job, mymapper.class, longwritable.class,text.class,longwritable.class, text.class, mymapper); configuration reduceconf = new configuration(true); chainreducer.setreducer(job, reducer1.class, text.class, longwritable.class,text.class,longwritable.class, reduceconf); configuration reducer2 =new configuration(false); chainreducer.addmapper(job, reducer2.class, text.class, longwritable.class,text.class, longwritable.class, reducer2);` fileinputformat.addinputpath(job, new path(args[0])); fileoutputformat.setoutputpath(job, new path(args[1]));` system.exit(job.waitforcompletion(true) ? 0 : 1);}}
can please me?
Comments
Post a Comment