org.apache.hadoop.hive.serde2.lazydio
Class LazyDioShort

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.LazyPrimitive<LazyShortObjectInspector,ShortWritable>
              extended by org.apache.hadoop.hive.serde2.lazy.LazyShort
                  extended by org.apache.hadoop.hive.serde2.lazydio.LazyDioShort

public class LazyDioShort
extends LazyShort

LazyShortBinary for storing a short value as a ShortWritable. This class complements class LazyShort. It's primary difference is the init(ByteArrayRef, int, int) method, which reads the short value stored from the default binary format.


Field Summary
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyPrimitive
data, isNull
 
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
oi
 
Constructor Summary
LazyDioShort(LazyDioShort copy)
           
LazyDioShort(LazyShortObjectInspector oi)
           
 
Method Summary
 void init(ByteArrayRef bytes, int start, int length)
          Set the data for this LazyObjectBase.
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyShort
parseShort, parseShort
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyPrimitive
getObject, getWritableObject, hashCode, logExceptionMessage, toString
 
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject
getInspector, setInspector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyDioShort

public LazyDioShort(LazyShortObjectInspector oi)

LazyDioShort

public LazyDioShort(LazyDioShort copy)
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.

Overrides:
init in class LazyShort
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


Copyright © 2011 The Apache Software Foundation