|
|
-
InputFormat in mapred vs. mapreduce.
Jane Chen 2010-12-06, 21:35
In Hadoop 0.21, I found InputFormat as an Interface in package mapred, and as an abstract class in package mapreduce. The APIs are slightly different. Which one should I choose to extend from or implement? How are the two packages intended to be used differently?
Thanks, Jane
-
Re: InputFormat in mapred vs. mapreduce.
Harsh J 2010-12-07, 13:51
mapred.* is the old, "stable" API, while the mapreduce.* stuff is newer. With 0.21, I'd suggest using mapreduce.*
mapred.* stuff isn't compatible directly with mapreduce.*. If you are using the New API all over (driver, mapper, etc.), you should use the mapreduce.* only, right?
On Tue, Dec 7, 2010 at 3:05 AM, Jane Chen <[EMAIL PROTECTED]> wrote: > In Hadoop 0.21, I found InputFormat as an Interface in package mapred, and as an abstract class in package mapreduce. The APIs are slightly different. Which one should I choose to extend from or implement? How are the two packages intended to be used differently? > > Thanks, > Jane > > > >
-- Harsh J www.harshj.com
-
Re: InputFormat in mapred vs. mapreduce.
Jane Chen 2010-12-07, 17:52
Harsh, thank you for your response. That's what I guessed.
In 0.20, Interface InputFormat under mapred package was deprecated. In 0.21, it is no longer deprecated. Why is that?
Thanks, Jane
--- On Tue, 12/7/10, Harsh J <[EMAIL PROTECTED]> wrote:
> From: Harsh J <[EMAIL PROTECTED]> > Subject: Re: InputFormat in mapred vs. mapreduce. > To: [EMAIL PROTECTED] > Date: Tuesday, December 7, 2010, 5:51 AM > mapred.* is the old, "stable" API, > while the mapreduce.* stuff is > newer. With 0.21, I'd suggest using mapreduce.* > > mapred.* stuff isn't compatible directly with mapreduce.*. > If you are > using the New API all over (driver, mapper, etc.), you > should use the > mapreduce.* only, right? > > On Tue, Dec 7, 2010 at 3:05 AM, Jane Chen <[EMAIL PROTECTED]> > wrote: > > In Hadoop 0.21, I found InputFormat as an Interface in > package mapred, and as an abstract class in package > mapreduce. The APIs are slightly different. Which one > should I choose to extend from or implement? How are the > two packages intended to be used differently? > > > > Thanks, > > Jane > > > > > > > > > > > > -- > Harsh J > www.harshj.com >
-
Re: InputFormat in mapred vs. mapreduce.
Greg Roelofs 2010-12-07, 22:51
Jane Chen wrote:
> In 0.20, Interface InputFormat under mapred package was deprecated. > In 0.21, it is no longer deprecated. Why is that?
IIRC, it's because not all of the old features have yet been reproduced in the new API, so it's premature to deprecate the old one. The list archives over the last six months (if not more) have several examples of people running into that sort of problem. (A non-InputFormat example is MultipleOutputFormat, I believe. Not sure about CombineFileInputFormat.)
Long-term, I believe the plan is still to deprecate mapred in favor of mapreduce, but some of the plumbing remains to be done first.
Greg
|
|