org.apache.hadoop.hive.serde2.dynamic_type
Class DynamicSerDe

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe
All Implemented Interfaces:
Serializable, Deserializer, SerDe, Serializer

public class DynamicSerDe
extends Object
implements SerDe, Serializable

DynamicSerDe.

See Also:
Serialized Form

Field Summary
protected  ByteStream.Input bis_
           
protected  ByteStream.Output bos_
           
protected  org.apache.thrift.protocol.TProtocol iprot_
           
static org.apache.commons.logging.Log LOG
           
static String META_TABLE_NAME
           
protected  org.apache.thrift.protocol.TProtocol oprot_
          protocols are protected in case any of their properties need to be queried from another class in this package.
 
Constructor Summary
DynamicSerDe()
           
 
Method Summary
 Object deserialize(org.apache.hadoop.io.Writable field)
          Deserialize an object out of a Writable blob.
static ObjectInspector dynamicSerDeStructBaseToObjectInspector(DynamicSerDeTypeBase bt)
           
 ObjectInspector getObjectInspector()
          Get the object inspector that can be used to navigate through the internal structure of the Object returned from deserialize(...).
 Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
          Returns the Writable class that would be returned by the serialize method.
 void initialize(org.apache.hadoop.conf.Configuration job, Properties tbl)
          Initialize the HiveDeserializer.
 org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector)
          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
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

META_TABLE_NAME

public static final String META_TABLE_NAME
See Also:
Constant Field Values

bis_

protected transient ByteStream.Input bis_

bos_

protected transient ByteStream.Output bos_

oprot_

protected transient org.apache.thrift.protocol.TProtocol oprot_
protocols are protected in case any of their properties need to be queried from another class in this package. For TCTLSeparatedProtocol for example, may want to query the separators.


iprot_

protected transient org.apache.thrift.protocol.TProtocol iprot_
Constructor Detail

DynamicSerDe

public DynamicSerDe()
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
Parameters:
job - System properties
tbl - table properties
Throws:
SerDeException

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
Parameters:
field - The Writable object containing a serialized object
Returns:
A Java object representing the contents in the blob.
Throws:
SerDeException

dynamicSerDeStructBaseToObjectInspector

public static ObjectInspector dynamicSerDeStructBaseToObjectInspector(DynamicSerDeTypeBase bt)
                                                               throws SerDeException
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

getSerializedClass

public Class<? extends org.apache.hadoop.io.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 org.apache.hadoop.io.Writable serialize(Object obj,
                                               ObjectInspector objInspector)
                                        throws SerDeException
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
Throws:
SerDeException


Copyright © 2010 The Apache Software Foundation