org.apache.hadoop.hive.ql.io.orc
Class OrcSerde

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.orc.OrcSerde
All Implemented Interfaces:
Deserializer, SerDe, Serializer

public class OrcSerde
extends Object
implements SerDe

A serde class for ORC. It transparently passes the object to/from the ORC file reader/writer.


Constructor Summary
OrcSerde()
           
 
Method Summary
 Object deserialize(Writable writable)
          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()
          Always returns null, since serialized size doesn't make sense in the context of ORC files.
 Class<? extends Writable> getSerializedClass()
          Returns the Writable class that would be returned by the serialize method.
 void initialize(Configuration conf, Properties table)
          Initialize the HiveDeserializer.
 Writable serialize(Object realRow, ObjectInspector inspector)
          Serialize an object by navigating inside the Object with the ObjectInspector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrcSerde

public OrcSerde()
Method Detail

initialize

public void initialize(Configuration conf,
                       Properties table)
Description copied from interface: Deserializer
Initialize the HiveDeserializer.

Specified by:
initialize in interface Deserializer
Specified by:
initialize in interface Serializer
Parameters:
conf - System properties
table - table properties

getSerializedClass

public Class<? extends Writable> getSerializedClass()
Description copied from interface: Serializer
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

serialize

public Writable serialize(Object realRow,
                          ObjectInspector inspector)
Description copied from interface: Serializer
Serialize an object by navigating inside the Object with the ObjectInspector. In most cases, the return value of this function will be constant since the function will reuse the Writable object. If the client wants to keep a copy of the Writable, the client needs to clone the returned value.

Specified by:
serialize in interface Serializer

deserialize

public Object deserialize(Writable writable)
                   throws SerDeException
Description copied from interface: Deserializer
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 returnDeserializered value by calling ObjectInspectorUtils.getStandardObject().

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

getObjectInspector

public ObjectInspector getObjectInspector()
                                   throws SerDeException
Description copied from interface: Deserializer
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
Throws:
SerDeException

getSerDeStats

public SerDeStats getSerDeStats()
Always returns null, since serialized size doesn't make sense in the context of ORC files.

Specified by:
getSerDeStats in interface Deserializer
Specified by:
getSerDeStats in interface Serializer
Returns:
null


Copyright © 2012 The Apache Software Foundation