Where sorting of data is done on Mapper or Reducer Node in MapReduce

Free Online Certification Courses – Learn Today. Lead Tomorrow. Forums Apache Hadoop Where sorting of data is done on Mapper or Reducer Node in MapReduce

Viewing 1 reply thread
  • Author
    Posts
    • #5974
      DataFlair TeamDataFlair Team
      Spectator

      Where sorting is done in MapReduce Job execution?

    • #5977
      DataFlair TeamDataFlair Team
      Spectator

      Sorting in MapReduce is on Both Mapper Side as well as Reducer side.

      Mapper side(Quick Sort)
      The Mapper process the input key value pair from Record Reader and generates output as per custom Business logic, before writing the data the output is partitioned and sorted by key.

      Reducer side(Merge Sort):
      In Reducer phase the data from the Mapper is again sorted as per the key and sent to Reducer for processing data as per custom business logic.The shuffling and sorting in Reducer phase happens simultaneously.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.