hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <static.void....@gmail.com>
Subject Re: Writable questions
Date Tue, 31 Aug 2010 18:04:16 GMT
  On 8/31/10 10:04 AM, Steve Hoffman wrote:
> That is the default 'toString()' output of any Java object.  If you
> want your custom Writable to print something different you have to
> override the toString() method.
> Steve
> On Tue, Aug 31, 2010 at 11:58 AM, Mark<static.void.dev@gmail.com>  wrote:
>>   I have a question regarding outputting Writable objects. I thought all
>> Writables know how to serialize themselves to output.
>> For example I have an ArrayWritable of strings (or Texts) but when I output
>> it to a file it shows up as 'org.apache.hadoop.io.ArrayWritable@21f7186f'
>> Am I missing something? I would have expected it to output "String1 String2
>> String3" etc. If I am going about this the wrong way can someone explain the
>> proper way for my reduce phase to output a key and a list of values. Thanks
It's not my own Writable but an instance of ArrayWritable.

View raw message