Old and New API In Hadoop

This article will gives you difference between Old API's and New API's in Hadoop.
Old API New API
A) Driver Code
1) JobConf (org.apache.hadoop.mapred)
   (all configuration)
1) Job (org.apache.hadoop.mapred)
2) JobClient.runJob(JobConf)
 (execution start - submmiting
  job to client)
2) WaitForCompletion
3) Tool, ToolRunner class 3) Don't have such class
4) Tool, ToolRunner class 4) Don't have such class
B) Mapper Code
1) MapReduceBase class
  (org.apache.hadoop.mapred)
1) Don't have such class
2) Mapper is an interface 2) Mapper is an abstract class
3) OutputCollector, Reporter
  methods are present
3) Context class is present
4) collect(key,value) 4) write(key,value)
C) Reduce Code
1) MapReduceBase class
  (org.apache.hadoop.mapred)
1) Don't have such class
2) Reducer is an interface 2) Reducer is an abstract class
3) OutputCollector, Reporter
  methods are present
3) Context class is present
4) collect(key,value) 4) write(key,value)
5) Iterator 5) Iterable
6) Partitioner is an interface 6) Partitioner is an abstarct class

Thats all in this article, please share your views.

2 comments:

Post a Comment