public class AvroSerDe extends AbstractSerDe
| Modifier and Type | Field and Description |
|---|---|
static String |
AVRO_INT_TYPE_NAME |
static String |
AVRO_LONG_TYPE_NAME |
static String |
AVRO_PROP_LOGICAL_TYPE |
static String |
AVRO_PROP_MAX_LENGTH |
static String |
AVRO_PROP_PRECISION |
static String |
AVRO_PROP_SCALE |
static String |
AVRO_STRING_TYPE_NAME |
static String |
CHAR_TYPE_NAME |
static String |
DATE_TYPE_NAME |
static String |
DECIMAL_TYPE_NAME |
static String |
LIST_COLUMN_COMMENTS |
static String |
TABLE_COMMENT |
static String |
TABLE_NAME |
static String |
TIMESTAMP_TYPE_NAME |
static String |
VARCHAR_TYPE_NAME |
static String |
WRITER_PROLEPTIC |
static String |
WRITER_TIME_ZONE |
static String |
WRITER_ZONE_CONVERSION_LEGACY |
configuration, log, partitionProperties, properties, tableProperties| Constructor and Description |
|---|
AvroSerDe() |
| Modifier and Type | Method and Description |
|---|---|
Object |
deserialize(org.apache.hadoop.io.Writable writable)
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(...).
|
static org.apache.avro.Schema |
getSchemaFromCols(Properties properties,
List<String> columnNames,
List<TypeInfo> columnTypes,
String columnCommentProperty) |
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
Returns the Writable class that would be returned by the serialize method.
|
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
Initialize the SerDe.
|
org.apache.hadoop.io.Writable |
serialize(Object o,
ObjectInspector objectInspector)
Serialize an object by navigating inside the Object with the
ObjectInspector.
|
boolean |
shouldStoreFieldsInMetastore(Map<String,String> tableParams) |
getColumnComments, getColumnNames, getColumnTypes, getConfiguration, getPartitionColumnComments, getPartitionColumnNames, getPartitionColumnTypes, getSerDeStats, parseColumnComments, parseColumnNames, parseColumnNames, parseColumnTypes, parseColumnTypes, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithandleJobLevelConfigurationpublic static final String TABLE_NAME
public static final String TABLE_COMMENT
public static final String LIST_COLUMN_COMMENTS
public static final String DECIMAL_TYPE_NAME
public static final String CHAR_TYPE_NAME
public static final String VARCHAR_TYPE_NAME
public static final String DATE_TYPE_NAME
public static final String TIMESTAMP_TYPE_NAME
public static final String WRITER_TIME_ZONE
public static final String WRITER_PROLEPTIC
public static final String WRITER_ZONE_CONVERSION_LEGACY
public static final String AVRO_PROP_LOGICAL_TYPE
public static final String AVRO_PROP_PRECISION
public static final String AVRO_PROP_SCALE
public static final String AVRO_PROP_MAX_LENGTH
public static final String AVRO_STRING_TYPE_NAME
public static final String AVRO_INT_TYPE_NAME
public static final String AVRO_LONG_TYPE_NAME
public void initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
throws SerDeException
AbstractSerDeinitialize in class AbstractSerDeconfiguration - Hadoop configurationtableProperties - Table propertiespartitionProperties - Partition properties (may be null if
table has no partitions)SerDeException - if SerDe fails to initializepublic static org.apache.avro.Schema getSchemaFromCols(Properties properties, List<String> columnNames, List<TypeInfo> columnTypes, String columnCommentProperty)
public Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
AbstractSerDegetSerializedClass in interface SerializergetSerializedClass in class AbstractSerDepublic org.apache.hadoop.io.Writable serialize(Object o, ObjectInspector objectInspector) throws SerDeException
Serializerserialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic Object deserialize(org.apache.hadoop.io.Writable writable) throws SerDeException
Deserializerdeserialize in interface Deserializerdeserialize in class AbstractSerDewritable - The Writable object containing a serialized objectSerDeExceptionpublic ObjectInspector getObjectInspector() throws SerDeException
DeserializerSerDeExceptionpublic boolean shouldStoreFieldsInMetastore(Map<String,String> tableParams)
shouldStoreFieldsInMetastore in class AbstractSerDeCopyright © 2022 The Apache Software Foundation. All rights reserved.