19

I spent almost a day but couldn't figure out how to use IdentityReducer in the new Hadoop API. All references or classes I can find are with the old API. And obviously mixing up old API idetntitreducer class in the new API codebase doesn't go well. Any help will be appreciated.

kee
  • 10,969
  • 24
  • 107
  • 168
  • Just to add a bit more detail: import org.apache.hadoop.mapred.lib.IdentityReducer is what I can find wherever I look but this isn't a new API class. – kee Mar 17 '12 at 03:16

3 Answers3

37

Mainly because in the new API Mapper and Reducer are classes instead of interfaces, they are the new replacement of IdentityMapper/Reducer.

So you just have to use Mapper.class and Reducer.class to get the identity.

Thomas Jungblut
  • 20,854
  • 6
  • 68
  • 91
0

Hadoop Streaming - Hadoop 1.0.2

According to this, the command is

-x org.apache.hadoop.mapred.lib.IdentityX

where x = mapper or reducer and X = Mapper or Reducer respectively.

I tested myself and works.

vpap
  • 1,389
  • 2
  • 21
  • 32
0

Have a look :

http://hadoop.apache.org/common/docs/r1.0.0/api/org/apache/hadoop/mapred/lib/IdentityReducer.html

Its for hadoop stable version

Mohyt
  • 990
  • 2
  • 10
  • 26