Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop Mapper: Class or Interface

Tags:

hadoop

I am a bit confused about the basic Mapper structure in Hadoop. On the web, many example implementations use Mapper as a class and thus their classes extend Mapper. As far as I have seen, which is Hadoop 19, Mapper is an interface. What happened?

like image 593
user442920 Avatar asked Jul 13 '26 08:07

user442920


1 Answers

In the old API, Mappers implemented an interface as you might expect.

When the big overhaul came around, they decided to change it to a fully fledged class so that it can act as the often needed Identity Mapper if used as is, or extended for your own implementations.

It's just a matter of whether you're using the old or new API for your project, you shouldn't mix - org.apache.hadoop.mapred is the old API, org.apache.hadoop.mapreduce is the new.

like image 70
Quetzalcoatl Avatar answered Jul 15 '26 06:07

Quetzalcoatl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!