What are the primary phases of a Reducer in Hadoop?

In Hadoop, there are three primary phases of a Reducer:

  • Shuffle: In this phase, Reducer copies the sorted output from each Mapper.
  • Sort: In this phase, Hadoop framework sorts the input to Reducer by same key. It uses merge sort in this phase. Sometimes, shuffle and sort phases occur at the same time.
  • Reduce: This is the phase in which output values associated with a key are reduced to give output result. Output from Reducer is not re-sorted.