You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by CloudyEye <su...@gmail.com> on 2008/04/21 14:27:52 UTC

Using ArrayWritable of type IntWritable

Hi,

>From the API , I should create new class as follows:

public class IntArrayWritable extends ArrayWritable { 
	public IntArrayWritable() { 
		super(IntWritable.class); 
	}
 }

In the reducer, When executing 
OutputCollector.collect(WritableComparable key, IntArrayWritable arr)

I am getting something like:
key1	    utils.IntArrayWritable@3c9217
key2	    utils.IntArrayWritable@9b42e6
key3	    utils.IntArrayWritable@14520eb
key4	    utils.IntArrayWritable@1742700
...
...

What else do I have to override in "ArrayWritable " to get the IntWritable
values written to the output files by the reducers?
If you have some ready code for such case I will be very thankful.

Cheers,

-- 
View this message in context: http://www.nabble.com/Using-ArrayWritable-of-type-IntWritable-tp16807489p16807489.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: Using ArrayWritable of type IntWritable

Posted by CloudyEye <su...@gmail.com>.


Doug Cutting-4 wrote:
> 
> public String toString();
> 
> Doug
> 

That's it.
 Many thanks.
-- 
View this message in context: http://www.nabble.com/Using-ArrayWritable-of-type-IntWritable-tp16807489p16823104.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.


Re: Using ArrayWritable of type IntWritable

Posted by Doug Cutting <cu...@apache.org>.
CloudyEye wrote:
> What else do I have to override in "ArrayWritable " to get the IntWritable
> values written to the output files by the reducers?

public String toString();

Doug