You are viewing a single comment's thread. Return to all comments →
def mapper(record): record = record.replace('\n', '') data = record.split(',') if data[0] == 'Department': mapReducer.emitIntermediate(data[1], ('D', data[2])) elif data[0] == 'Employee': mapReducer.emitIntermediate(data[2], ('P', data[1])) def reducer(key, list_of_values): name = [ item[1] for item in list_of_values if item[0] == 'P'][0] for item in [item[1] for item in list_of_values if item[0] == 'D']: mapReducer.emit((key, name, item))
Seems like cookies are disabled on this browser, please enable them to open this website
Map Reduce Advanced - Relational Join
You are viewing a single comment's thread. Return to all comments →