1. If you have the binaries that were compiled against MRv1 *mapred* libs, it should just work with MRv2. 2. If you have the source code that refers to MRv1 *mapred* libs, it should be compilable without code changes. Of course, you're free to change your code. 3. If you have the binaries that were compiled against MRv1 *mapreduce* libs, it may not be executable directly with MRv2, but you should able to compile it against MRv2 *mapreduce* libs without code changes, and execute it.
- Zhijie On Tue, Apr 15, 2014 at 12:44 PM, Radhe Radhe <[email protected]>wrote: > Thanks John for your comments, > > I believe MRv2 has support for both the old *mapred* APIs and new > *mapreduce* APIs. > > I see this way: > [1.] One may have binaries i.e. jar file of the M\R program that used old > *mapred* APIs > This will work directly on MRv2(YARN). > > [2.] One may have the source code i.e. Java Programs of the M\R program > that used old *mapred* APIs > For this I need to recompile and generate the binaries i.e. jar file. > Do I have to change the old *org.apache.hadoop.mapred* APIs to new * > org.apache.hadoop.mapreduce* APIs? or No code changes are needed? > > -RR > > > Date: Mon, 14 Apr 2014 10:37:56 -0400 > > Subject: Re: Doubt regarding Binary Compatibility\Source Compatibility > with old *mapred* APIs and new *mapreduce* APIs in Hadoop > > From: [email protected] > > To: [email protected] > > > > > Also, "Source Compatibility" also means ONLY a recompile is needed. > > No code changes should be needed. > > > > On Mon, Apr 14, 2014 at 10:37 AM, John Meagher <[email protected]> > wrote: > > > Source Compatibility = you need to recompile and use the new version > > > as part of the compilation > > > > > > Binary Compatibility = you can take something compiled against the old > > > version and run it on the new version > > > > > > On Mon, Apr 14, 2014 at 9:19 AM, Radhe Radhe > > > <[email protected]> wrote: > > >> Hello People, > > >> > > >> As per the Apache site > > >> > http://hadoop.apache.org/docs/r2.3.0/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduce_Compatibility_Hadoop1_Hadoop2.html > > >> > > >> Binary Compatibility > > >> ==================== > > >> First, we ensure binary compatibility to the applications that use old > > >> mapred APIs. This means that applications which were built against > MRv1 > > >> mapred APIs can run directly on YARN without recompilation, merely by > > >> pointing them to an Apache Hadoop 2.x cluster via configuration. > > >> > > >> Source Compatibility > > >> ==================== > > >> We cannot ensure complete binary compatibility with the applications > that > > >> use mapreduce APIs, as these APIs have evolved a lot since MRv1. > However, we > > >> ensure source compatibility for mapreduce APIs that break binary > > >> compatibility. In other words, users should recompile their > applications > > >> that use mapreduce APIs against MRv2 jars. One notable binary > > >> incompatibility break is Counter and CounterGroup. > > >> > > >> For "Binary Compatibility" I understand that if I had build a MR job > with > > >> old *mapred* APIs then they can be run directly on YARN without and > changes. > > >> > > >> Can anybody explain what do we mean by "Source Compatibility" here > and also > > >> a use case where one will need it? > > >> > > >> Does that mean code changes if I already have a MR job source code > written > > >> with with old *mapred* APIs and I need to make some changes to it to > run in > > >> then I need to use the new "mapreduce* API and generate the new > binaries? > > >> > > >> Thanks, > > >> -RR > > >> > > >> > -- Zhijie Shen Hortonworks Inc. http://hortonworks.com/ -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.
