org.apache.hadoop.hive.serde2
Class ByteStreamTypedSerDe

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

public abstract class ByteStreamTypedSerDe
extends TypedSerDe


Field Summary
protected  ByteStream.Input bis
           
protected  ByteStream.Output bos
           
 
Fields inherited from class org.apache.hadoop.hive.serde2.TypedSerDe
deserializeCache, objectClass, objectType
 
Constructor Summary
ByteStreamTypedSerDe(Type objectType)
           
 
Method Summary
 Object deserialize(org.apache.hadoop.io.Writable field)
          Deserialize an object out of a Writable blob.
 
Methods inherited from class org.apache.hadoop.hive.serde2.TypedSerDe
getObjectInspector, getObjectInspectorOptions, getSerializedClass, initialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bis

protected ByteStream.Input bis

bos

protected ByteStream.Output bos
Constructor Detail

ByteStreamTypedSerDe

public ByteStreamTypedSerDe(Type objectType)
                     throws SerDeException
Throws:
SerDeException
Method Detail

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 TypedSerDe
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