public class LazySimpleSerDe extends AbstractEncodingAwareSerDe
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
charset
configErrors
Constructor and Description |
---|
LazySimpleSerDe() |
Modifier and Type | Method and Description |
---|---|
Object |
doDeserialize(org.apache.hadoop.io.Writable field)
Deserialize a row from the Writable to a LazyObject.
|
org.apache.hadoop.io.Writable |
doSerialize(Object obj,
ObjectInspector objInspector)
Serialize a row of data.
|
ObjectInspector |
getObjectInspector()
Returns the ObjectInspector for the row.
|
SerDeStats |
getSerDeStats()
Returns the statistics after (de)serialization)
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
Returns the Writable Class after serialization.
|
void |
initialize(org.apache.hadoop.conf.Configuration job,
Properties tbl)
Initialize the SerDe given the parameters.
|
static void |
serialize(ByteStream.Output out,
Object obj,
ObjectInspector objInspector,
byte[] separators,
int level,
org.apache.hadoop.io.Text nullSequence,
boolean escaped,
byte escapeChar,
boolean[] needsEscape)
Serialize the row into the StringBuilder.
|
protected void |
serializeField(ByteStream.Output out,
Object obj,
ObjectInspector objInspector,
LazySerDeParameters serdeParams) |
String |
toString() |
protected org.apache.hadoop.io.Writable |
transformFromUTF8(org.apache.hadoop.io.Writable blob)
transform Writable data from UTF-8 to charset before serialize.
|
protected org.apache.hadoop.io.Writable |
transformToUTF8(org.apache.hadoop.io.Writable blob)
transform Writable data from charset to UTF-8 before doDeserialize.
|
deserialize, serialize
getConfigurationErrors, initialize
public LazySimpleSerDe() throws SerDeException
SerDeException
public void initialize(org.apache.hadoop.conf.Configuration job, Properties tbl) throws SerDeException
initialize
in interface Deserializer
initialize
in interface Serializer
initialize
in class AbstractEncodingAwareSerDe
job
- System properties. Can be null in compile timetbl
- table propertiesSerDeException
SerDe#initialize(Configuration, Properties)
public Object doDeserialize(org.apache.hadoop.io.Writable field) throws SerDeException
doDeserialize
in class AbstractEncodingAwareSerDe
field
- the Writable that contains the dataSerDeException
SerDe#deserialize(Writable)
public ObjectInspector getObjectInspector() throws SerDeException
getObjectInspector
in interface Deserializer
getObjectInspector
in class AbstractSerDe
SerDeException
public Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
getSerializedClass
in interface Serializer
getSerializedClass
in class AbstractSerDe
SerDe#getSerializedClass()
public org.apache.hadoop.io.Writable doSerialize(Object obj, ObjectInspector objInspector) throws SerDeException
doSerialize
in class AbstractEncodingAwareSerDe
obj
- The row objectobjInspector
- The ObjectInspector for the row objectIOException
SerDeException
SerDe#serialize(Object, ObjectInspector)
protected void serializeField(ByteStream.Output out, Object obj, ObjectInspector objInspector, LazySerDeParameters serdeParams) throws SerDeException
SerDeException
public static void serialize(ByteStream.Output out, Object obj, ObjectInspector objInspector, byte[] separators, int level, org.apache.hadoop.io.Text nullSequence, boolean escaped, byte escapeChar, boolean[] needsEscape) throws IOException, SerDeException
out
- The StringBuilder to store the serialized data.obj
- The object for the current field.objInspector
- The ObjectInspector for the current Object.separators
- The separators array.level
- The current level of separator.nullSequence
- The byte sequence representing the NULL value.escaped
- Whether we need to escape the data when writing outescapeChar
- Which char to use as the escape char, e.g. '\\'needsEscape
- Which byte needs to be escaped for 256 bytes.IOException
SerDeException
public SerDeStats getSerDeStats()
getSerDeStats
in interface Deserializer
getSerDeStats
in interface Serializer
getSerDeStats
in class AbstractSerDe
protected org.apache.hadoop.io.Writable transformFromUTF8(org.apache.hadoop.io.Writable blob)
AbstractEncodingAwareSerDe
transformFromUTF8
in class AbstractEncodingAwareSerDe
protected org.apache.hadoop.io.Writable transformToUTF8(org.apache.hadoop.io.Writable blob)
AbstractEncodingAwareSerDe
transformToUTF8
in class AbstractEncodingAwareSerDe
Copyright © 2017 The Apache Software Foundation. All rights reserved.