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 |
configErrors| 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.
|
org.apache.avro.Schema |
determineSchemaOrReturnErrorSchema(org.apache.hadoop.conf.Configuration conf,
Properties props)
Attempt to determine the schema via the usual means, but do not throw
an exception if we fail.
|
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) |
SerDeStats |
getSerDeStats()
Returns statistics collected when serializing
|
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 properties)
Initialize the HiveSerializer.
|
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) |
getConfigurationErrorspublic 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 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 propertiesSerDeExceptionpublic void initialize(org.apache.hadoop.conf.Configuration configuration,
Properties properties)
throws SerDeException
AbstractSerDeinitialize in interface Deserializerinitialize in interface Serializerinitialize in class AbstractSerDeconfiguration - System properties. Can be null in compile timeproperties - table propertiesSerDeExceptionpublic static org.apache.avro.Schema getSchemaFromCols(Properties properties, List<String> columnNames, List<TypeInfo> columnTypes, String columnCommentProperty)
public org.apache.avro.Schema determineSchemaOrReturnErrorSchema(org.apache.hadoop.conf.Configuration conf,
Properties props)
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
AbstractSerDeserialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic Object deserialize(org.apache.hadoop.io.Writable writable) throws SerDeException
AbstractSerDedeserialize in interface Deserializerdeserialize in class AbstractSerDewritable - The Writable object containing a serialized objectSerDeExceptionpublic ObjectInspector getObjectInspector() throws SerDeException
AbstractSerDegetObjectInspector in interface DeserializergetObjectInspector in class AbstractSerDeSerDeExceptionpublic SerDeStats getSerDeStats()
AbstractSerDegetSerDeStats in interface DeserializergetSerDeStats in interface SerializergetSerDeStats in class AbstractSerDepublic boolean shouldStoreFieldsInMetastore(Map<String,String> tableParams)
shouldStoreFieldsInMetastore in class AbstractSerDeCopyright © 2019 The Apache Software Foundation. All Rights Reserved.