Q1: What is the difference between OLD API AND NEW API?
ANS:- OLD API
*OLD API used Mapper & Reducer as Interface. *OLD API can still be found in org.apache.hadoop.mapred. *Controlling mappers by writing MapRunnable, but no equivalent exists for reducers. *Job Control was done through JobClient. *In old API both map and reduce outputs are named part-nnnnn. *In Old API, the reduce() method passes values as a java.lang.Iterator
*New API used Mapper and Reducer as Class. *New API is in the org.apache.hadoop.mapreduce package. *New API allows both mappers and reducers to control the execution flow by overriding the run() method. *Job control is done through the JOBclass in New API. *In the new API map outputs are named part-m-nnnnn, and reduce outputs are named part-r-nnnnn. *In new API, the reduce() method passes values as a java.lang.Iterable