public abstract class AbstractEncodingAwareSerDe extends AbstractSerDe
Modifier and Type | Field and Description |
---|---|
protected Charset |
charset |
configuration, log, partitionProperties, properties, tableProperties
Constructor and Description |
---|
AbstractEncodingAwareSerDe() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(org.apache.hadoop.io.Writable blob)
Deserialize an object out of a Writable blob.
|
protected abstract Object |
doDeserialize(org.apache.hadoop.io.Writable blob) |
protected abstract org.apache.hadoop.io.Writable |
doSerialize(Object obj,
ObjectInspector objInspector) |
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
Initialize the SerDe.
|
org.apache.hadoop.io.Writable |
serialize(Object obj,
ObjectInspector objInspector)
Serialize an object by navigating inside the Object with the
ObjectInspector.
|
protected abstract org.apache.hadoop.io.Writable |
transformFromUTF8(org.apache.hadoop.io.Writable blob)
transform Writable data from UTF-8 to charset before serialize.
|
protected abstract org.apache.hadoop.io.Writable |
transformToUTF8(org.apache.hadoop.io.Writable blob)
transform Writable data from charset to UTF-8 before doDeserialize.
|
getColumnComments, getColumnNames, getColumnTypes, getConfiguration, getPartitionColumnComments, getPartitionColumnNames, getPartitionColumnTypes, getSerDeStats, getSerializedClass, parseColumnComments, parseColumnNames, parseColumnNames, parseColumnTypes, parseColumnTypes, shouldStoreFieldsInMetastore, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getObjectInspector
protected Charset charset
public void initialize(org.apache.hadoop.conf.Configuration configuration, Properties tableProperties, Properties partitionProperties) throws SerDeException
AbstractSerDe
initialize
in class AbstractSerDe
configuration
- Hadoop configurationtableProperties
- Table propertiespartitionProperties
- Partition properties (may be null
if
table has no partitions)SerDeException
- if SerDe fails to initializepublic final org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
Serializer
serialize
in interface Serializer
serialize
in class AbstractSerDe
SerDeException
protected abstract org.apache.hadoop.io.Writable transformFromUTF8(org.apache.hadoop.io.Writable blob)
blob
- protected abstract org.apache.hadoop.io.Writable doSerialize(Object obj, ObjectInspector objInspector) throws SerDeException
SerDeException
public final Object deserialize(org.apache.hadoop.io.Writable blob) throws SerDeException
Deserializer
deserialize
in interface Deserializer
deserialize
in class AbstractSerDe
blob
- The Writable object containing a serialized objectSerDeException
protected abstract org.apache.hadoop.io.Writable transformToUTF8(org.apache.hadoop.io.Writable blob)
blob
- protected abstract Object doDeserialize(org.apache.hadoop.io.Writable blob) throws SerDeException
SerDeException
Copyright © 2022 The Apache Software Foundation. All rights reserved.