Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> while loop issue in reduce


+
Ranjan Sen 2010-12-04, 17:50
Copy link to this message
-
Re: while loop issue in reduce
Is a_el an ArrayList ?
If not, you only get the last element's value.

On Sat, Dec 4, 2010 at 9:50 AM, Ranjan Sen <[EMAIL PROTECTED]> wrote:

>
> Hi
>
> I want to copy the values from the key and Iterator of value input in a
> reduce function. I was using a ArrayList to copy the list content into. I
> was using a
> while(values.haveNext()) {
> a_el=values.next();
> }
>
> My input is supposed to have only one key into the reduce with around 625
> value elements in the list. I do get the value elements copied but I have
> all of them with the value of the last element in them.
>
> I think the reduce process processing the list but at the termination of
> the while loop it is doing something I cannot understand.
>
> Any suggestions?
>
> Thanks a lot
>
> Ranjan
+
Ranjan Sen 2010-12-04, 18:08