public class TableSerDe extends Object
Modifier and Type | Field and Description |
---|---|
protected List<Object> |
hiveRow |
protected MapWritable |
kvMapWritable |
Constructor and Description |
---|
TableSerDe() |
Modifier and Type | Method and Description |
---|---|
protected ObjectInspector |
createObjectInspector() |
Object |
deserialize(Writable field)
Deserializes the given Writable parameter and returns a Java Object
representing the contents of that parameter.
|
ObjectInspector |
getObjectInspector()
Returns the ObjectInspector that can be used to navigate through the
internal structure of the Object returned from the deserialize method.
|
SerDeStats |
getSerDeStats()
Returns statistics collected when deserializing and/or serializing.
|
Class<? extends Writable> |
getSerializedClass()
Return the Writable class returned by the serialize method; which is
used to initialize the SequenceFile header.
|
void |
initialize(Configuration job,
Properties tbl) |
Writable |
serialize(Object obj,
ObjectInspector objectInspector)
Serialize the given Object by navigating inside the Object with the
given ObjectInspector.
|
String |
toString() |
protected void |
validateParams(Properties tbl)
Verifies that the names and types of the fields in the KV Store
table correctly map to the names and types of the Hive table
against which the Hive query is to be executed.
|
protected MapWritable kvMapWritable
protected void validateParams(Properties tbl) throws SerDeException
SerDeException
protected ObjectInspector createObjectInspector() throws SerDeException
SerDeException
public Object deserialize(Writable field) throws SerDeException
deserialize
in interface Deserializer
field
- The Writable object containing a serialized object from
a row of the KVStore table with name specified by tableName.SerDeException
public Writable serialize(Object obj, ObjectInspector objectInspector) throws SerDeException
serialize
in interface Serializer
obj
- The Object whose contents are examined and from which the
return value is constructed.objectInspector
- The object to use to navigate the given Object's
contents.SerDeException
public void initialize(Configuration job, Properties tbl) throws SerDeException
initialize
in interface Deserializer
initialize
in interface Serializer
SerDeException
public SerDeStats getSerDeStats()
getSerDeStats
in interface Deserializer
getSerDeStats
in interface Serializer
public ObjectInspector getObjectInspector() throws SerDeException
getObjectInspector
in interface Deserializer
SerDeException
public Class<? extends Writable> getSerializedClass()
getSerializedClass
in interface Serializer
Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.