No, there is no way to get the number of values for a current key.

==> BTW, the iterators given to Reduce are one-time use iterators, right?

Hadoop-5266 introduced mark/reset support for values iterator. You may want
to take a look at that.

Cheers
Jothi

On 6/15/09 7:07 AM, "jason hadoop" <jason.had...@gmail.com> wrote:

> It would be nice if there was an interface compliant way. Perhaps it becomes
> available in the 0.20 and beyond api's.
> 
> On Sat, Jun 13, 2009 at 3:40 PM, Rares Vernica <rvern...@gmail.com> wrote:
> 
>> Hello,
>> 
>> In Reduce, can I get the number of values for the current key without
>> iterating over them? Does Hadoop has this number?
>> 
>> Or, at least the total number of pairs that will be processed by the
>> current Reduce instance. I am pretty sure that Hadoop already knows
>> this number because it sorted them.
>> 
>> BTW, the iterators given to Reduce are one-time use iterators, right?
>> 
>> Thanks!
>> Rares
>> 
> 
> 

Reply via email to