org.apache.hadoop.hive.serde2.thrift
Class ThriftByteStreamTypedSerDe

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.TypedSerDe
      extended by org.apache.hadoop.hive.serde2.ByteStreamTypedSerDe
          extended by org.apache.hadoop.hive.serde2.thrift.ThriftByteStreamTypedSerDe
All Implemented Interfaces:
Deserializer, SerDe, Serializer

public class ThriftByteStreamTypedSerDe
extends ByteStreamTypedSerDe


Field Summary
protected  org.apache.thrift.protocol.TProtocol inProtocol
           
protected  org.apache.thrift.transport.TIOStreamTransport inTransport
           
protected  org.apache.thrift.protocol.TProtocol outProtocol
           
protected  org.apache.thrift.transport.TIOStreamTransport outTransport
           
 
Fields inherited from class org.apache.hadoop.hive.serde2.ByteStreamTypedSerDe
bis, bos
 
Fields inherited from class org.apache.hadoop.hive.serde2.TypedSerDe
deserializeCache, objectClass, objectType
 
Constructor Summary
ThriftByteStreamTypedSerDe(Type objectType, org.apache.thrift.protocol.TProtocolFactory inFactory, org.apache.thrift.protocol.TProtocolFactory outFactory)
           
 
Method Summary
 Object deserialize(org.apache.hadoop.io.Writable field)
          Deserialize an object out of a Writable blob.
protected  ObjectInspectorFactory.ObjectInspectorOptions getObjectInspectorOptions()
           
 void initialize(org.apache.hadoop.conf.Configuration job, Properties tbl)
          Initialize the HiveDeserializer.
 
Methods inherited from class org.apache.hadoop.hive.serde2.TypedSerDe
getObjectInspector, getSerializedClass, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outTransport

protected org.apache.thrift.transport.TIOStreamTransport outTransport

inTransport

protected org.apache.thrift.transport.TIOStreamTransport inTransport

outProtocol

protected org.apache.thrift.protocol.TProtocol outProtocol

inProtocol

protected org.apache.thrift.protocol.TProtocol inProtocol
Constructor Detail

ThriftByteStreamTypedSerDe

public ThriftByteStreamTypedSerDe(Type objectType,
                                  org.apache.thrift.protocol.TProtocolFactory inFactory,
                                  org.apache.thrift.protocol.TProtocolFactory outFactory)
                           throws SerDeException
Throws:
SerDeException
Method Detail

initialize

public void initialize(org.apache.hadoop.conf.Configuration job,
                       Properties tbl)
                throws SerDeException
Description copied from interface: Deserializer
Initialize the HiveDeserializer.

Specified by:
initialize in interface Deserializer
Specified by:
initialize in interface Serializer
Overrides:
initialize in class TypedSerDe
Parameters:
job - System properties
tbl - table properties
Throws:
SerDeException

getObjectInspectorOptions

protected ObjectInspectorFactory.ObjectInspectorOptions getObjectInspectorOptions()
Overrides:
getObjectInspectorOptions in class TypedSerDe

deserialize

public Object deserialize(org.apache.hadoop.io.Writable field)
                   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 returned value by calling ObjectInspectorUtils.getStandardObject().

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


Copyright © 2009 The Apache Software Foundation