public class JsonSerDe extends AbstractSerDe
{"name="john","age"=30}
{"name="sue","age"=32}
| Modifier and Type | Field and Description |
|---|---|
static String |
BINARY_FORMAT |
static String |
IGNORE_EXTRA |
static String |
NULL_EMPTY_LINES |
static String |
STRINGIFY_COMPLEX |
configuration, log, partitionProperties, properties, tableProperties| Constructor and Description |
|---|
JsonSerDe() |
| Modifier and Type | Method and Description |
|---|---|
Object |
deserialize(org.apache.hadoop.io.Writable blob)
Deserialize an object out of a Writable blob containing JSON text.
|
BinaryEncoding |
getBinaryEncoding() |
ObjectInspector |
getObjectInspector()
Returns an object inspector for the specified schema that is capable of
reading in the object representation of the JSON string.
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
Returns the Writable class that would be returned by the serialize method.
|
StructTypeInfo |
getTypeInfo() |
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
Initialize the SerDe.
|
void |
initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties,
boolean writeablePrimitivesDeserialize)
Initialize the SerDe.
|
boolean |
isNullEmptyLines() |
org.apache.hadoop.io.Writable |
serialize(Object obj,
ObjectInspector objInspector)
Given an object and object inspector pair, traverse the object
and generate a Text representation of the object.
|
getColumnComments, getColumnNames, getColumnTypes, getConfiguration, getPartitionColumnComments, getPartitionColumnNames, getPartitionColumnTypes, getSerDeStats, parseColumnComments, parseColumnNames, parseColumnNames, parseColumnTypes, parseColumnTypes, shouldStoreFieldsInMetastore, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waithandleJobLevelConfigurationpublic static final String BINARY_FORMAT
public static final String STRINGIFY_COMPLEX
public static final String IGNORE_EXTRA
public static final String NULL_EMPTY_LINES
public void initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties)
throws SerDeException
initialize in class AbstractSerDeconfiguration - Hadoop configurationtableProperties - Table propertiespartitionProperties - Partition properties (may be null if
table has no partitions)NullPointerException - if tableProperties is nullSerDeException - if SerDe fails to initializepublic void initialize(org.apache.hadoop.conf.Configuration configuration,
Properties tableProperties,
Properties partitionProperties,
boolean writeablePrimitivesDeserialize)
throws SerDeException
configuration - Hadoop configurationtableProperties - Table propertiespartitionProperties - Partition properties (may be null if
table has no partitions)writeablePrimitivesDeserialize - true if outputs are Hadoop WritableNullPointerException - if tableProperties is nullSerDeException - if SerDe fails to initializepublic Object deserialize(org.apache.hadoop.io.Writable blob) throws SerDeException
deserialize in interface Deserializerdeserialize in class AbstractSerDeblob - The Writable (Text) object containing a serialized objectSerDeExceptionpublic org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
serialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic ObjectInspector getObjectInspector() throws SerDeException
SerDeExceptionpublic Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
AbstractSerDegetSerializedClass in interface SerializergetSerializedClass in class AbstractSerDepublic StructTypeInfo getTypeInfo()
public BinaryEncoding getBinaryEncoding()
public boolean isNullEmptyLines()
Copyright © 2022 The Apache Software Foundation. All rights reserved.