Re: Lazily deserializing Writables

2008-10-02 Thread Jimmy Lin
Hi Bryan, Thanks, this answers my question! So at the very least you'll have to read in the raw bytes and hang on to them. -Jimmy > We do this with some of our Thrift-serialized types. We account for > this behavior explicitly in the ThrittWritable class and make it so > that we can read the se

Re: Lazily deserializing Writables

2008-10-02 Thread Andrzej Bialecki
Jimmy Lin wrote: Hi everyone, I'm wondering if it's possible to lazily deserialize a Writable. That is, when my custom Writable is handed a DataInput from readFields, can I simply hang on to the reference and read from it later? This would be useful if the Writable is a complex data structure

Re: Lazily deserializing Writables

2008-10-02 Thread Bryan Duxbury
We do this with some of our Thrift-serialized types. We account for this behavior explicitly in the ThrittWritable class and make it so that we can read the serialized version off the wire completely by prepending the size. Then, we can read in the raw bytes and hang on to them for later as

Lazily deserializing Writables

2008-10-02 Thread Jimmy Lin
Hi everyone, I'm wondering if it's possible to lazily deserialize a Writable. That is, when my custom Writable is handed a DataInput from readFields, can I simply hang on to the reference and read from it later? This would be useful if the Writable is a complex data structure that may be expensi