org.apache.hadoop.hive.serde2.columnar
Class ColumnarSerDeBase

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.AbstractSerDe
      extended by org.apache.hadoop.hive.serde2.columnar.ColumnarSerDeBase
All Implemented Interfaces:
Deserializer, SerDe, Serializer
Direct Known Subclasses:
ColumnarSerDe, LazyBinaryColumnarSerDe

public abstract class ColumnarSerDeBase
extends AbstractSerDe


Field Summary
protected  ObjectInspector cachedObjectInspector
           
protected  boolean lastOperationDeserialize
           
protected  boolean lastOperationSerialize
           
protected  long serializedSize
           
protected  SerDeStats stats
           
 
Constructor Summary
ColumnarSerDeBase()
           
 
Method Summary
 Object deserialize(Writable blob)
          Deserialize an object out of a Writable blob.
 ObjectInspector getObjectInspector()
          Get the object inspector that can be used to navigate through the internal structure of the Object returned from deserialize(...).
 SerDeStats getSerDeStats()
          Returns statistics collected when serializing
 Class<? extends Writable> getSerializedClass()
          Returns the Writable class that would be returned by the serialize method.
protected  void initialize(int size)
           
 
Methods inherited from class org.apache.hadoop.hive.serde2.AbstractSerDe
initialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cachedObjectInspector

protected ObjectInspector cachedObjectInspector

serializedSize

protected long serializedSize

stats

protected SerDeStats stats

lastOperationSerialize

protected boolean lastOperationSerialize

lastOperationDeserialize

protected boolean lastOperationDeserialize
Constructor Detail

ColumnarSerDeBase

public ColumnarSerDeBase()
Method Detail

deserialize

public Object deserialize(Writable blob)
                   throws SerDeException
Description copied from class: AbstractSerDe
Deserialize an object out of a Writable blob. In most cases, the return value of this function will be constant since the function will reuse the returned object. If the client wants to keep a copy of the object, the client needs to clone the returned value by calling ObjectInspectorUtils.getStandardObject().

Specified by:
deserialize in interface Deserializer
Specified by:
deserialize in class AbstractSerDe
Parameters:
blob - The Writable object containing a serialized object
Returns:
A Java object representing the contents in the blob.
Throws:
SerDeException

getSerDeStats

public SerDeStats getSerDeStats()
Description copied from class: AbstractSerDe
Returns statistics collected when serializing

Specified by:
getSerDeStats in interface Deserializer
Specified by:
getSerDeStats in interface Serializer
Specified by:
getSerDeStats in class AbstractSerDe

getSerializedClass

public Class<? extends Writable> getSerializedClass()
Description copied from class: AbstractSerDe
Returns the Writable class that would be returned by the serialize method. This is used to initialize SequenceFile header.

Specified by:
getSerializedClass in interface Serializer
Specified by:
getSerializedClass in class AbstractSerDe

initialize

protected void initialize(int size)
                   throws SerDeException
Throws:
SerDeException

getObjectInspector

public ObjectInspector getObjectInspector()
                                   throws SerDeException
Description copied from class: AbstractSerDe
Get the object inspector that can be used to navigate through the internal structure of the Object returned from deserialize(...).

Specified by:
getObjectInspector in interface Deserializer
Specified by:
getObjectInspector in class AbstractSerDe
Throws:
SerDeException


Copyright © 2012 The Apache Software Foundation