46

Why are there two separate packages map-reduce package in Apache's hadoop package tree:

org.apache.hadoop.mapred 

http://javasourcecode.org/html/open-source/hadoop/hadoop-1.0.3/org/apache/hadoop/mapred/

org.apache.hadoop.mapreduce

http://javasourcecode.org/html/open-source/hadoop/hadoop-1.0.3/org/apache/hadoop/mapreduce/

Why are they separated out? Is there documentation that clarifies this?

bartonm
  • 1,600
  • 3
  • 18
  • 30
  • 2
    some more references [mapred or mapreduce][1] to help mapred api vs mapreduce [1]: http://stackoverflow.com/questions/7598422/is-it-better-to-use-the-mapred-or-the-mapreduce-package-to-create-a-hadoop-job/7600339#7600339 – Laxmikanth Samudrala Apr 29 '13 at 16:04
  • Possible duplicate http://stackoverflow.com/questions/7598422/is-it-better-to-use-the-mapred-or-the-mapreduce-package-to-create-a-hadoop-job – Gaurav Kumar Jun 23 '14 at 12:38

1 Answers1

66

They are separated out because both of these packages represent 2 different APIs. org.apache.hadoop.mapred is the older API and org.apache.hadoop.mapreduce is the new one. And it was done to allow programmers write MapReduce jobs in a more convenient, easier and sophisticated fashion. You might find this presentation useful, which talks about the differences in detail.

Hope this answers your question.

Tariq
  • 34,076
  • 8
  • 57
  • 79
  • If I have the option for something things between mapred and mapreduce, but some only have the option for mapred, should I use mapred everywhere? – Dan Ciborowski - MSFT May 08 '14 at 16:47
  • Note that the the old api was un-deprecated and might even be recommended, see http://stackoverflow.com/questions/7598422/is-it-better-to-use-the-mapred-or-the-mapreduce-package-to-create-a-hadoop-job – Aaron Feldman Jan 18 '17 at 19:16