You are viewing a single comment's thread. Return to all comments →
Simple way:
def mapper(record): f1, f2 = record.replace('\n', '').split(' ') mapReducer.emitIntermediate(f1, f2) mapReducer.emitIntermediate(f2, f1)
def reducer(key, list_of_values): mapReducer.emit([key, len(list_of_values)])
Seems like cookies are disabled on this browser, please enable them to open this website
Map Reduce Advanced - Count number of friends
You are viewing a single comment's thread. Return to all comments →
Simple way: