0

I'm using Hadoop version 0.22.0 downloaded here. I started to create my custom mapper and reducer according to this tutorial and found out that interface Mapper<K1, V1, K2, V2> that is to be implemented by all mapper classes is deprecated. Interface Reducer<K2, V2, K3, V3> that is meant to be implemented by all reducers (at least according to the tutorial) is also deprecated. So are classes like MapReduceBase and JobConf. These are all core classes and interfaces that are needed by all custom mappers and reducers, aren't they? There is no note in javadoc what should be used as a replacement of those deprecated classes.

So what interfaces and classes should I use instead of those deprecated ones? Or should I use them anyway? Why are they deprecated? Please just explain to me what's going on and what should I do because I'm not getting it.

Rasto
  • 17,204
  • 47
  • 154
  • 245

2 Answers2

1

Classes from the org.apache.hadoop.mapred package are from the old MR API and from the org.apache.hadoop.mapreduce are from the new API. Note that all the classes have not been ported from the old API to the new API. Here is a similar thread from SO.

Community
  • 1
  • 1
Praveen Sripati
  • 32,799
  • 16
  • 80
  • 117
0

There is a class (not interface!) with the same name Mapper<KEYIN, VALUEIN, KEYOUT, VALUEOUT> in package org.apache.hadoop.mapreduce that should be used instead of the interface and base class. Same story with reducer: there is a class Reducer<KEYIN, VALUEIN, KEYOUT, VALUEOUT> in package org.apache.hadoop.mapreduce.

I still don't know what to do with JobConf and such but I'll update my answer when I found out.


Edit: Class Configuration is to be used instead of JobConf.

Rasto
  • 17,204
  • 47
  • 154
  • 245