AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Facebook friends mapper license key11/4/2023 But compareTo is invoked only 5 times pareTo(key2), pareTo(ke圓), ke圓.compareTo(key4),pareTo(key5),pareTo(key6). But the problem i am facing is that the compareTo method is not invoked for all combinations of pairs and hence the reducer logic is failing.īased on the above example, there are 6 K, V pairs emitted by the mapper. The key here is actually a Custom writable, created a class which extends WritableComparable and i have overridden the compareTo method so that both these pairs (a,b) and (b,a) are same. Tried to implement the same using mapreduce by creating custom writables, with the mapper emitting following key values, key being pair of friends and value being related friends of the first friend in the key (ie, pair of friends) Given the above the mutual friends between abc and cxf is xyz. Hence abc has xyz, def and cxf as friendscxf has xyz abc and yyy as friends. The json file content has the following pattern :įriend json tab separated by array of related friends json's I was trying a mapreduce program in hadoop (Java version), to find the mutual friends list from a json file.
0 Comments
Read More
Leave a Reply. |