org.apache.hadoop.hive.serde2.lazy
Class LazyNonPrimitive<OI extends ObjectInspector>
java.lang.Object
org.apache.hadoop.hive.serde2.lazy.LazyObject<OI>
org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive<OI>
- Direct Known Subclasses:
- LazyArray, LazyMap, LazyStruct
public abstract class LazyNonPrimitive<OI extends ObjectInspector>
- extends LazyObject<OI>
LazyPrimitive stores a primitive Object in a LazyObject.
Constructor Summary |
protected |
LazyNonPrimitive(OI oi)
Create a LazyNonPrimitive object with the specified ObjectInspector. |
Method Summary |
Object |
getObject()
If the LazyObject 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 LazyObject. |
bytes
protected ByteArrayRef bytes
start
protected int start
length
protected int length
LazyNonPrimitive
protected LazyNonPrimitive(OI oi)
- Create a LazyNonPrimitive object with the specified ObjectInspector.
- Parameters:
oi
- The ObjectInspector would have to have a hierarchy of
LazyObjectInspectors with the leaf nodes being
WritableObjectInspectors. It's used both for accessing the
type hierarchy of the complex object, as well as getting
meta information (separator, nullSequence, etc) when parsing
the lazy object.
init
public void init(ByteArrayRef bytes,
int start,
int length)
- Description copied from class:
LazyObject
- Set the data for this LazyObject.
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 LazyObject<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
getObject
public Object getObject()
- Description copied from class:
LazyObject
- If the LazyObject is a primitive Object, then deserialize it and return
the actual primitive Object.
Otherwise (array, map, struct), return this.
- Specified by:
getObject
in class LazyObject<OI extends ObjectInspector>
hashCode
public int hashCode()
- Specified by:
hashCode
in class LazyObject<OI extends ObjectInspector>
Copyright © 2009 The Apache Software Foundation