The purpose of a deserialize method is to turn a data blob
which is a writable representation of the data into an
object that can then be parsed using the appropriate
ObjectInspector. In this case, since HCatRecord is directly
already the Writable object, there's no extra work to be done
here. Most of the logic resides in the ObjectInspector to be
able to return values from within the HCatRecord to hive when
it wants it.
The purpose of the serialize method is to turn an object-representation
with a provided ObjectInspector into a Writable format, which
the underlying layer can then use to write out.
In this case, it means that Hive will call this method to convert
an object with appropriate objectinspectors that it knows about,
to write out a HCatRecord.
Return an object inspector that can read through the object
that we return from deserialize(). To wit, that means we need
to return an ObjectInspector that can read HCatRecord, given
the type info for it during initialize(). This also means
that this method cannot and should not be called before initialize()