I may be wrong but it seems that you are approaching this problem like you would in the normal programming world and rightly so.
Depending on the set of the data ( triangle square or other ), you could do some simple things like spit out the right side of your pair as the key and the left side as the value. Then all the pairs with 41 will show up at the same reducer and you can do you you magic there. Of course this depends on the setup of your data. Cheers James Sent from my mobile. Please excuse the typos. On 2010-12-19, at 7:29 PM, Praveen Bathala <[email protected]> wrote: > Hi, > > I am trying to write a MapReduce code to find friends of friends in a social > network with MapReduce. > my data snippet : > > 1 41 > 1 7 > 1 100 > 2 64 > 2 65 > 2 42 > 2 86 > 3 54 > 3 24 > 3 16 > 3 43 > 4 39 > 4 52 > > Here map() goes through line by line, now I get "41" as friend to "1" and I > want to go to all "41"'s to get his friends. how can I do that. > Can I jump to any line I need in Mapper class? > > Please, Help me with this... > > Thanks in advance > + Praveen
