org.apache.hadoop.hive.serde2.lazy
Class LazyNonPrimitive<OI extends ObjectInspector>

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazy.LazyObjectBase
      extended by org.apache.hadoop.hive.serde2.lazy.LazyObject<OI>
          extended by org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive<OI>
Direct Known Subclasses:
LazyArray, LazyMap, LazyStruct, LazyUnion

public abstract class LazyNonPrimitive<OI extends ObjectInspector>
extends LazyObject<OI>

LazyPrimitive stores a primitive Object in a LazyObject.


Method Summary
 Object getObject()
          If the LazyObjectBase 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 LazyObjectBase.
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public void init(ByteArrayRef bytes,
                 int start,
                 int length)
Description copied from class: LazyObjectBase
Set the data for this LazyObjectBase. 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.

Specified by:
init in class LazyObjectBase
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

getObject

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

Specified by:
getObject in class LazyObjectBase

hashCode

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


Copyright © 2014 The Apache Software Foundation. All rights reserved.