public class LazyBinarySerDe extends AbstractSerDe
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
LazyBinarySerDe() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
deserialize(Writable field)
Deserialize a table record to a lazybinary struct.
|
ObjectInspector |
getObjectInspector()
Returns the ObjectInspector for the row.
|
SerDeStats |
getSerDeStats()
Returns the statistics after (de)serialization)
|
java.lang.Class<? extends Writable> |
getSerializedClass()
Returns the Writable Class after serialization.
|
void |
initialize(Configuration conf,
java.util.Properties tbl)
Initialize the SerDe with configuration and table information.
|
static boolean |
serialize(ByteStream.Output byteStream,
java.lang.Object obj,
ObjectInspector objInspector,
boolean skipLengthPrefix,
boolean warnedOnceNullMapKey)
A recursive function that serialize an object to a byte buffer based on its
object inspector.
|
Writable |
serialize(java.lang.Object obj,
ObjectInspector objInspector)
Serialize an object to a byte buffer in a binary compact way.
|
public LazyBinarySerDe()
throws SerDeException
SerDeExceptionpublic void initialize(Configuration conf,
java.util.Properties tbl)
throws SerDeException
initialize in interface Deserializerinitialize in interface Serializerinitialize in class AbstractSerDeconf - System propertiestbl - table propertiesSerDeExceptionpublic ObjectInspector getObjectInspector() throws SerDeException
getObjectInspector in interface DeserializergetObjectInspector in class AbstractSerDeSerDeExceptionpublic java.lang.Class<? extends Writable> getSerializedClass()
getSerializedClass in interface SerializergetSerializedClass in class AbstractSerDepublic java.lang.Object deserialize(Writable field)
throws SerDeException
deserialize in interface Deserializerdeserialize in class AbstractSerDefield - The Writable object containing a serialized objectSerDeExceptionpublic Writable serialize(java.lang.Object obj,
ObjectInspector objInspector)
throws SerDeException
serialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic static boolean serialize(ByteStream.Output byteStream, java.lang.Object obj, ObjectInspector objInspector, boolean skipLengthPrefix, boolean warnedOnceNullMapKey) throws SerDeException
byteStream - the byte stream storing the serialization dataobj - the object to serializeobjInspector - the object inspectorskipLengthPrefix - a boolean indicating whether length prefix is
needed for list/map/structwarnedOnceNullMapKey - a boolean indicating whether a warning
has been issued once already when encountering null map keysSerDeExceptionpublic SerDeStats getSerDeStats()
getSerDeStats in interface DeserializergetSerDeStats in interface SerializergetSerDeStats in class AbstractSerDeCopyright © 2012 The Apache Software Foundation