What is Identity reducer?

Viewing 2 reply threads
  • Author
    Posts
    • #6140
      DataFlair TeamDataFlair Team
      Spectator

      Explain Identity reducer in MapReduce?

    • #6143
      DataFlair TeamDataFlair Team
      Spectator

      Identity Reducer is the default reducer in Hadoop old API. When no reducer class is set by job.setReducerClass() method in Driver class, Identity reducer is used as the default reducer.

      It doesn’t provide any processing on the input, it will flush whatever input key value pair is fed to it as output.

    • #6145
      DataFlair TeamDataFlair Team
      Spectator

      Identity Reducer is one of the few predefined classes provided by Hadoop.
      IdentityReducer API is available under org.apache.hadoop.mapred.lib package.
      It will be invoked by default if no Reducer class mentioned in Driver class of MapReduce job.
      The input Key, Value pairs are just dumped into output as it is without any aggregation, except the data is sorted based on the key.
      Here, shuffle & sort happens except the aggregation. Hence, Identity Reducer is used if you only want to sort the input data from map output.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.