public class JSonSerde extends Object implements org.apache.hadoop.hive.serde2.SerDe
Only STRING keys are supported for Hive MAPs.
Constructor and Description |
---|
JSonSerde() |
Modifier and Type | Method and Description |
---|---|
Object |
deserialize(org.apache.hadoop.io.Writable blob)
This method does the work of deserializing a record into Java objects that Hive can work with via the
ObjectInspector interface.
|
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector |
getObjectInspector()
Return an ObjectInspector for the row of data
|
org.apache.hadoop.hive.serde2.SerDeStats |
getSerDeStats()
Unimplemented
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
JSON is just a textual representation, so our serialized class is just Text.
|
void |
initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
An initialization function used to gather information about the table.
|
org.apache.hadoop.io.Writable |
serialize(Object obj,
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector oi) |
public void initialize(org.apache.hadoop.conf.Configuration conf, Properties tbl) throws org.apache.hadoop.hive.serde2.SerDeException
initialize
in interface org.apache.hadoop.hive.serde2.Deserializer
initialize
in interface org.apache.hadoop.hive.serde2.Serializer
conf
- the conftbl
- the tblorg.apache.hadoop.hive.serde2.SerDeException
- the ser de exceptionpublic Object deserialize(org.apache.hadoop.io.Writable blob) throws org.apache.hadoop.hive.serde2.SerDeException
deserialize
in interface org.apache.hadoop.hive.serde2.Deserializer
blob
- the bloborg.apache.hadoop.hive.serde2.SerDeException
- the ser de exceptionpublic org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector getObjectInspector() throws org.apache.hadoop.hive.serde2.SerDeException
getObjectInspector
in interface org.apache.hadoop.hive.serde2.Deserializer
org.apache.hadoop.hive.serde2.SerDeException
public org.apache.hadoop.hive.serde2.SerDeStats getSerDeStats()
getSerDeStats
in interface org.apache.hadoop.hive.serde2.Deserializer
getSerDeStats
in interface org.apache.hadoop.hive.serde2.Serializer
public Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
getSerializedClass
in interface org.apache.hadoop.hive.serde2.Serializer
public org.apache.hadoop.io.Writable serialize(Object obj, org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector oi) throws org.apache.hadoop.hive.serde2.SerDeException
serialize
in interface org.apache.hadoop.hive.serde2.Serializer
org.apache.hadoop.hive.serde2.SerDeException
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.