0
votes

I have a file that contains only numbers(separated by comma) and we need to sort the numbers(The numbers list will contain duplicates)? I would like to know what will be the input and output in each phase of the MR framework i.e what will be the input in the Map phase and what will be the input in the Reduce phase

1

1 Answers

0
votes

The sort in MR is doing by the comparator, it's based on the key index.

So, I'd recommend creating Integer as the key output in your mapper function, and the value should be the same integer.

So, you'll have:

Mapper: <Interger, Interger>
Reducer: <Interger, Interger>