hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Douglas <chri...@yahoo-inc.com>
Subject Re: aerialization.Deserializer.deserialize method help
Date Fri, 12 Sep 2008 21:20:02 GMT
If you pass in null to the deserializer, it creates a new instance and  
returns it; passing in an instance reuses it.

I don't understand the disconnect between Deserializer and the  
RecordReader. Does your RecordReader generate instances that only  
share a common subtype T? You need separate Deserializers for K and V,  
if that's the issue... -C

On Sep 12, 2008, at 2:01 PM, Pete Wyckoff wrote:

>
> This method's signature is
> {code}
> T deserialize(T);
> {code}
>
> But, the RecordReader next method is
>
> {code}
> boolean next(K,V);
> {code}
>
> So, if the deserialize method does not return the same T (i.e., K or  
> V), how
> would this new Object be propagated back thru the RecordReader next  
> method.
>
> It seems the contract on the deserialize method is that it must  
> return the
> same  T (although the javadocs say "may").
>
> Am I missing something? And if not, why isn't the API boolean  
> deserialize(T)
> ?
>
> Thanks, pete
>
> Ps for things like Thrift, there's no way to re-use the object as  
> there's no
> clear method, so if this is the case, I don't see how it would work??
>


Mime
View raw message