public class JsonSerDe extends java.lang.Object implements SerDe
| Constructor and Description |
|---|
JsonSerDe() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
deserialize(Writable blob)
Takes JSON string in Text form, and has to return an object representation above
it that's readable by the corresponding object inspector.
|
java.lang.String |
getHiveInternalColumnName(int fpos) |
ObjectInspector |
getObjectInspector()
Returns an object inspector for the specified schema that
is capable of reading in the object representation of the JSON string
|
int |
getPositionFromHiveInternalColumnName(java.lang.String internalName) |
SerDeStats |
getSerDeStats()
Returns statistics collected when serializing
|
java.lang.Class<? extends Writable> |
getSerializedClass()
Returns the Writable class that would be returned by the serialize method.
|
void |
initialize(Configuration conf,
java.util.Properties tbl)
Initialize the HiveDeserializer.
|
Writable |
serialize(java.lang.Object obj,
ObjectInspector objInspector)
Given an object and object inspector pair, traverse the object
and generate a Text representation of the object.
|
public void initialize(Configuration conf,
java.util.Properties tbl)
throws SerDeException
Deserializerinitialize in interface Deserializerinitialize in interface Serializerconf - System propertiestbl - table propertiesSerDeExceptionpublic java.lang.Object deserialize(Writable blob)
throws SerDeException
deserialize in interface Deserializerblob - The Writable object containing a serialized objectSerDeExceptionpublic java.lang.String getHiveInternalColumnName(int fpos)
public int getPositionFromHiveInternalColumnName(java.lang.String internalName)
public Writable serialize(java.lang.Object obj,
ObjectInspector objInspector)
throws SerDeException
serialize in interface SerializerSerDeExceptionpublic ObjectInspector getObjectInspector() throws SerDeException
getObjectInspector in interface DeserializerSerDeExceptionpublic java.lang.Class<? extends Writable> getSerializedClass()
SerializergetSerializedClass in interface Serializerpublic SerDeStats getSerDeStats()
DeserializergetSerDeStats in interface DeserializergetSerDeStats in interface SerializerCopyright © 2012 The Apache Software Foundation