org.apache.hadoop.hive.serde2.lazybinary
Class LazyBinaryNonPrimitive<OI extends ObjectInspector>

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryObject<OI>
      extended by org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryNonPrimitive<OI>
Type Parameters:
OI -
Direct Known Subclasses:
LazyBinaryArray, LazyBinaryMap, LazyBinaryStruct

public abstract class LazyBinaryNonPrimitive<OI extends ObjectInspector>
extends LazyBinaryObject<OI>

LazyBinaryNonPrimitive.


Field Summary
protected  ByteArrayRef bytes
           
protected  int length
           
protected  int start
           
 
Constructor Summary
protected LazyBinaryNonPrimitive(OI oi)
           
 
Method Summary
 Object getObject()
          If the LazyBinaryObject is a primitive Object, then deserialize it and return the actual primitive Object.
 int hashCode()
           
 void init(ByteArrayRef bytes, int start, int length)
          Set the data for this LazyBinaryObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bytes

protected ByteArrayRef bytes

start

protected int start

length

protected int length
Constructor Detail

LazyBinaryNonPrimitive

protected LazyBinaryNonPrimitive(OI oi)
Method Detail

getObject

public Object getObject()
Description copied from class: LazyBinaryObject
If the LazyBinaryObject is a primitive Object, then deserialize it and return the actual primitive Object. Otherwise (string, list, map, struct), return this.

Specified by:
getObject in class LazyBinaryObject<OI extends ObjectInspector>

init

public void init(ByteArrayRef bytes,
                 int start,
                 int length)
Description copied from class: LazyBinaryObject
Set the data for this LazyBinaryObject. We take ByteArrayRef instead of byte[] so that we will be able to drop the reference to byte[] by a single assignment. The ByteArrayRef object can be reused across multiple rows. Never call this function if the object represent a null!!!

Specified by:
init in class LazyBinaryObject<OI extends ObjectInspector>
Parameters:
bytes - The wrapper of the byte[].
start - The start position inside the bytes.
length - The length of the data, starting from "start"
See Also:
ByteArrayRef

hashCode

public int hashCode()
Specified by:
hashCode in class LazyBinaryObject<OI extends ObjectInspector>


Copyright © 2011 The Apache Software Foundation