Hi,

Are we sure that this issue was fixed in 0.17.0(or do we need to patch).
I am using this version and I still see the issue? 


Thanks,
Deepika 

-----Original Message-----
From: Arun C Murthy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 19, 2008 1:04 PM
To: core-user@hadoop.apache.org
Subject: Re: Cannot read reducer values into a list


On Aug 19, 2008, at 12:17 PM, Stuart Sierra wrote:

> Hello list,
> Thought I would share this tidbit that frustrated me for a couple of
> hours.  Beware!  Hadoop reuses the Writable objects given to the
> reducer.  For example:
>

Yes.
http://issues.apache.org/jira/browse/HADOOP-2399 - fixed in 0.17.0.

Arun

>    public void reduce(K key, Iterator<V> values,
>                       OutputCollector<K, V> output,
>                       Reporter reporter)
>        throws IOException {
>
>        List<V> valueList = new ArrayList<V>();
>        while (values.hasNext()) {
>            valueList.add(values.next());
>        }
>
>        // Say there were 10 values.  valueList now contains 10
>        // pointers to the same object.
>    }
>
> I assume this is done for efficiency, but a warning in the Reducer
> documentation would be nice.
>
> -Stuart

Reply via email to