apache spark - Generate multiple key-value pair using transformation step of MapReduce -
in mapreduce framework, map method (transformation) works on each datapoint (k,v) produce new datapoint (k',v'). there mechanism generate pair of datapoints (k',v') , (k'',v'')?
i using apache spark. code snippet here:
javardd<string> myrdd = sc.textfile(...); javardd<string> newrdd = myrdd.map( new function<string, string>() { public vector call(string s) { ... } } );
by default, size of myrdd
, newrdd
same. objective have 2 entries in newrdd
each datapoint of myrdd
. how possible?
Comments
Post a Comment