I am trying to use JobControl to connect multiple Mappers and Reducers together but encounter the following error when invoking JobConf.setMapperClass:
setMapperClass(java.lang.Class extends org.apache.hadoop.mapred.Mapper>) in
org.apache.hadoop.mapred.JobConf cannot be applied to
(java.lang.Class)
It seems that java complains my implementation of Mapper, which is based on mapreduce.Mapper, while JobControl takes mapred.Mapper. (am I right on this part?)
Now my question is: should I keep using mapreduce.Mapper and give up JobControl and find something else to connect my jobs, or change my implementation to mapred.Mapper and keep using JobControl. Is one of them considered depreciated?
解决方案
As discussed in the comments, the mapred and mapreduce packages are distinct from each other, with mapreduce being the newer, cleaner one. The differences are further discussed on this post: hadoop.mapred vs hadoop.mapreduce?