public abstract class ProtobufSerDe extends AbstractSerDe
Modifier and Type | Field and Description |
---|---|
protected Class<? extends com.google.protobuf.Message> |
protoMessageClass |
configuration, log, partitionProperties, properties, tableProperties
Constructor and Description |
---|
ProtobufSerDe() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(org.apache.hadoop.io.Writable blob)
Deserialize an object out of a Writable blob.
|
ObjectInspector |
getObjectInspector()
Get the object inspector that can be used to navigate through the internal
structure of the Object returned from deserialize(...).
|
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 com.google.protobuf.Message |
toMessage(org.apache.hadoop.io.Writable writable)
Convert the given writable to a message.
|
getColumnComments, getColumnNames, getColumnTypes, getConfiguration, getPartitionColumnComments, getPartitionColumnNames, getPartitionColumnTypes, getSerDeStats, getSerializedClass, parseColumnComments, parseColumnNames, parseColumnNames, parseColumnTypes, parseColumnTypes, shouldStoreFieldsInMetastore, toString
protected Class<? extends com.google.protobuf.Message> protoMessageClass
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 org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
Serializer
serialize
in interface Serializer
serialize
in class AbstractSerDe
SerDeException
public 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 com.google.protobuf.Message toMessage(org.apache.hadoop.io.Writable writable) throws SerDeException
writable
- The writable object containing the message.SerDeException
public ObjectInspector getObjectInspector() throws SerDeException
Deserializer
SerDeException
Copyright © 2022 The Apache Software Foundation. All rights reserved.