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 Colin Freas <co...@gmail.com> on 2008/06/09 21:59:02 UTC

Simple question: call collect multiple times?

Sorry if this is a dumb question, but in all my MR classes, I've only ever
called collect once, and now I find myself wanting to call collect multiple
times.  Looking at the API it seems like there shouldn't be a problem with
that, but I just wanted to make sure.  (...and to seed Google with the
answer for the next Hadooper that wonders.  ;)

-Colin

Re: Simple question: call collect multiple times?

Posted by Chris Douglas <ch...@yahoo-inc.com>.
Yes, you can call collect as many times as you please. -C

On Jun 9, 2008, at 12:59 PM, Colin Freas wrote:

> Sorry if this is a dumb question, but in all my MR classes, I've  
> only ever
> called collect once, and now I find myself wanting to call collect  
> multiple
> times.  Looking at the API it seems like there shouldn't be a  
> problem with
> that, but I just wanted to make sure.  (...and to seed Google with the
> answer for the next Hadooper that wonders.  ;)
>
> -Colin


RE: Simple question: call collect multiple times?

Posted by Ashish Thusoo <at...@facebook.com>.
I you are asking whether you can call collect many times for every row
being processed, the answer is yes. MR does not put any restrictions on
how many output key, value pairs you can produce for every input key
value pair. 

Ashish

-----Original Message-----
From: Colin Freas [mailto:colinfreas@gmail.com] 
Sent: Monday, June 09, 2008 12:59 PM
To: Hadoop
Subject: Simple question: call collect multiple times?

Sorry if this is a dumb question, but in all my MR classes, I've only
ever called collect once, and now I find myself wanting to call collect
multiple times.  Looking at the API it seems like there shouldn't be a
problem with that, but I just wanted to make sure.  (...and to seed
Google with the answer for the next Hadooper that wonders.  ;)

-Colin