FAQ
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

Search Discussions

  • Ted Yu at Dec 4, 2010 at 9:43 pm
    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 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 at Dec 6, 2010 at 5:21 am
    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.

    I am using version 0.21.0.

    Any suggestions?

    Thanks a lot

    Ranjan

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedDec 4, '10 at 8:09p
activeDec 6, '10 at 5:21a
posts3
users2
websitehadoop.apache.org...
irc#hadoop

2 users in discussion

Ranjan Sen: 2 posts Ted Yu: 1 post

People

Translate

site design / logo © 2022 Grokbase