java - Writing only the Value on Mapper Job -
java - Writing only the Value on Mapper Job -
i working on mapreduce job using mapper without reducer. not need write key out because need values stored in array , want write out final output file. how can accomplish on hadoop? instead of writing output both key , value, interested in writing out values. values in array. thanks
public void pfor(testfor pfor,longwritable key, text value, context context, int times) throws ioexception, interruptedexception{ int n = 0; while(n < times){ pfor.pformap(key,value, context); n++; } for(int =0;i<uv.length; i++){ log.info(uv[i].get() + " final output"); } intarraywritable border = new intarraywritable(); edge.set(uv); context.write(new intwritable(java.lang.math.abs(randgen.nextint())), edge); uv= null; }
use nullwritable value , emit "edge" key.
https://hadoop.apache.org/docs/stable/api/org/apache/hadoop/io/nullwritable.html
java hadoop mapreduce
Comments
Post a Comment