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

Switch to Threaded View
Hadoop, mail # user - Very strange Java Collection behavior in Hadoop


Copy link to this message
-
Re: Very strange Java Collection behavior in Hadoop
madhu phatak 2012-03-20, 07:42
Thanks a lot :)

On Tue, Mar 20, 2012 at 11:50 AM, Owen O'Malley <[EMAIL PROTECTED]> wrote:

> On Mon, Mar 19, 2012 at 11:05 PM, madhu phatak <[EMAIL PROTECTED]>
> wrote:
>
> > Hi Owen O'Malley,
> >  Thank you for that Instant reply. It's working now. Can you explain me
> > what you mean by "input to reducer is reused" in little detail?
>
>
> Each time the statement "Text value = values.next();" is executed it always
> returns the same Text object with the contents of that object changed. When
> you add the Text to the list, you are adding a pointer to the same Text
> object. At the end you have 6 copies of the same pointer instead of 6
> different Text objects.
>
> The reason that I said it is my fault, is because I added the optimization
> that causes it. If you are interested in Hadoop archeology, it was
> HADOOP-2399 that made the change. I also did HADOOP-3522 to improve the
> documentation in the area.
>
> -- Owen
>

--
https://github.com/zinnia-phatak-dev/Nectar