hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken <kengoodh...@gmail.com>
Subject Re: ArrayWritable as Map/Reduce output value
Date Wed, 24 Nov 2010 23:16:07 GMT
Just create an array of intwritables, the wrap them in arraywritable. Your reducer will get
values as arraywritable, which can be unpacked back to the original array. The you can iterate
over that array. 

Sent from my iPad

On Nov 23, 2010, at 11:52 PM, Aravinth Bheemaraj <b.aravinth@gmail.com> wrote:

> Hi,
> 
> I am a beginner to Hadoop. Can anyone suggest me how to define Map/Reduce
> output value as an ArrayWritable?
> 
> The output value must contain array of integers.
> eg. (img1 , value[] { x-coord, y-coord, R, G, B})
> 
> How can the individual fields of the ArrayWritable can be accessed using the
> Iterator in the Reduce function? And also how to write the ArrayWritable
> object to the output file?
> 
> -- 
> Aravinth Bheemaraj
> University of Florida
> 
> 
> 
> 
> -- 
> Aravinth Bheemaraj
> University of Florida

Mime
View raw message