org.apache.hadoop.hive.serde2.lazybinary
Class LazyBinaryBoolean

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.lazy.LazyObjectBase
      extended by org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryObject<OI>
          extended by org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryPrimitive<WritableBooleanObjectInspector,org.apache.hadoop.io.BooleanWritable>
              extended by org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryBoolean

public class LazyBinaryBoolean
extends LazyBinaryPrimitive<WritableBooleanObjectInspector,org.apache.hadoop.io.BooleanWritable>

LazyBinaryObject for boolean which takes one byte

Part of the code is adapted from Apache Harmony Project. As with the specification, this implementation relied on code laid out in Henry S. Warren, Jr.'s Hacker's Delight, (Addison Wesley, 2002) as well as The Aggregate's Magic Algorithms.


Constructor Summary
LazyBinaryBoolean(LazyBinaryBoolean copy)
           
LazyBinaryBoolean(WritableBooleanObjectInspector 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.lazybinary.LazyBinaryPrimitive
getObject, getWritableObject, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyBinaryBoolean

public LazyBinaryBoolean(WritableBooleanObjectInspector oi)

LazyBinaryBoolean

public LazyBinaryBoolean(LazyBinaryBoolean 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.

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


Copyright © 2013 The Apache Software Foundation