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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -