If you can use an existing serializeable type to hold that field (e.g., if it's an integer, then use IntWritable) then you can just get away with that. If you are specifying your own class for a key or value class, then yes, the class must implement readFields() and write().
There's no concept of introspection or other "magic" to determine how to serialize types by decomposing them into more primitive types - you must manually insert the logic for this in every class you use. - Aaron On Wed, Jun 3, 2009 at 2:41 PM, dealmaker <vin...@gmail.com> wrote: > > Hi, > I have only one field for the record. I wonder if I even need to define a > member variable in class Record. Do I even need to implement readfields > and > write functions if I have only one field? Can I just use the "value" > object > directly instead of a member variable of value object? > Thanks. > -- > View this message in context: > http://www.nabble.com/Do-I-need-to-implement-Readfields-and-Write-Functions-If-I-have-Only-One-Field--tp23860009p23860009.html > Sent from the Hadoop core-user mailing list archive at Nabble.com. > >