You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by steven zhuang <zh...@gmail.com> on 2010/01/28 14:14:45 UTC
map(K1 key, V1 value, OutputCollector output, Reporter
reporter) deprecated in 0.20.2?
hello, all,
As a newbie, I have been used to the (k1,v1,k2,v2) format
parameter list for map and reduce methods in mapper and reducer(as is
written in many books), but after several failures, I found in 0.20+, if we
extends from base class org.apache.hadoop.mapreduce.Mapper, the map should
be something like this:
void map(KEYIN key, VALUEIN value, Context context) throws
IOException, InterruptedException
A little confusing to me.
My question is why the old fashion map interface deprecated?
thanks!
--
best wishes.
steven
Re: map(K1 key, V1 value, OutputCollector output, Reporter
reporter) deprecated in 0.20.2?
Posted by steven zhuang <zh...@gmail.com>.
thanks you guys :D
On Sat, Jan 30, 2010 at 2:16 AM, Jim Twensky <ji...@gmail.com> wrote:
> Steven,
>
> I recently had the same issues, and I found this blog post very
> helpful on migrating from 0.19 to 0.20.2
>
> http://sonerbalkir.blogspot.com/2010/01/new-hadoop-api-020x.html
>
> You can download the sample code at the end, which contains a Hadoop
> word count program written using the new API.
>
> Hope this helps.
>
> -Jim
>
> On Thu, Jan 28, 2010 at 9:43 AM, Edward Capriolo <ed...@gmail.com>
> wrote:
> > On Thu, Jan 28, 2010 at 8:14 AM, steven zhuang <zh...@gmail.com>
> wrote:
> >> hello, all,
> >> As a newbie, I have been used to the (k1,v1,k2,v2) format
> >> parameter list for map and reduce methods in mapper and reducer(as is
> >> written in many books), but after several failures, I found in 0.20+, if
> we
> >> extends from base class org.apache.hadoop.mapreduce.Mapper, the map
> should
> >> be something like this:
> >>
> >> void map(KEYIN key, VALUEIN value, Context context) throws
> >> IOException, InterruptedException
> >> A little confusing to me.
> >> My question is why the old fashion map interface
> deprecated?
> >> thanks!
> >>
> >>
> >> --
> >> best wishes.
> >> steven
> >>
> >
> > Steven,
> >
> > The old map/reduce api is still available. org.apache.hadoop.mapred
> >
> >> My question is why the old fashion map interface
> deprecated?
> >
> > Cause hadoop is like a freight train, either hop on or get out of the way
> ! :)
> > Just kidding,
> >
> > Great presentation about how to update code:
> > http://www.slideshare.net/sh1mmer/upgrading-to-the-new-map-reduce-api
> >
> > Some information on the 'why'
> >
> http://www.cloudera.com/blog/2009/05/07/what%E2%80%99s-new-in-hadoop-core-020/
> >
>
--
best wishes.
steven
Re: map(K1 key, V1 value, OutputCollector output, Reporter
reporter) deprecated in 0.20.2?
Posted by Jim Twensky <ji...@gmail.com>.
Steven,
I recently had the same issues, and I found this blog post very
helpful on migrating from 0.19 to 0.20.2
http://sonerbalkir.blogspot.com/2010/01/new-hadoop-api-020x.html
You can download the sample code at the end, which contains a Hadoop
word count program written using the new API.
Hope this helps.
-Jim
On Thu, Jan 28, 2010 at 9:43 AM, Edward Capriolo <ed...@gmail.com> wrote:
> On Thu, Jan 28, 2010 at 8:14 AM, steven zhuang <zh...@gmail.com> wrote:
>> hello, all,
>> As a newbie, I have been used to the (k1,v1,k2,v2) format
>> parameter list for map and reduce methods in mapper and reducer(as is
>> written in many books), but after several failures, I found in 0.20+, if we
>> extends from base class org.apache.hadoop.mapreduce.Mapper, the map should
>> be something like this:
>>
>> void map(KEYIN key, VALUEIN value, Context context) throws
>> IOException, InterruptedException
>> A little confusing to me.
>> My question is why the old fashion map interface deprecated?
>> thanks!
>>
>>
>> --
>> best wishes.
>> steven
>>
>
> Steven,
>
> The old map/reduce api is still available. org.apache.hadoop.mapred
>
>> My question is why the old fashion map interface deprecated?
>
> Cause hadoop is like a freight train, either hop on or get out of the way ! :)
> Just kidding,
>
> Great presentation about how to update code:
> http://www.slideshare.net/sh1mmer/upgrading-to-the-new-map-reduce-api
>
> Some information on the 'why'
> http://www.cloudera.com/blog/2009/05/07/what%E2%80%99s-new-in-hadoop-core-020/
>
Re: map(K1 key, V1 value, OutputCollector output, Reporter
reporter) deprecated in 0.20.2?
Posted by Edward Capriolo <ed...@gmail.com>.
On Thu, Jan 28, 2010 at 8:14 AM, steven zhuang <zh...@gmail.com> wrote:
> hello, all,
> As a newbie, I have been used to the (k1,v1,k2,v2) format
> parameter list for map and reduce methods in mapper and reducer(as is
> written in many books), but after several failures, I found in 0.20+, if we
> extends from base class org.apache.hadoop.mapreduce.Mapper, the map should
> be something like this:
>
> void map(KEYIN key, VALUEIN value, Context context) throws
> IOException, InterruptedException
> A little confusing to me.
> My question is why the old fashion map interface deprecated?
> thanks!
>
>
> --
> best wishes.
> steven
>
Steven,
The old map/reduce api is still available. org.apache.hadoop.mapred
> My question is why the old fashion map interface deprecated?
Cause hadoop is like a freight train, either hop on or get out of the way ! :)
Just kidding,
Great presentation about how to update code:
http://www.slideshare.net/sh1mmer/upgrading-to-the-new-map-reduce-api
Some information on the 'why'
http://www.cloudera.com/blog/2009/05/07/what%E2%80%99s-new-in-hadoop-core-020/