|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive
org.apache.hadoop.hive.serde2.lazy.LazyMap
public class LazyMap
LazyMap stores a map of Primitive LazyObjects to LazyObjects. Note that the keys of the map cannot contain null. LazyMap does not deal with the case of a NULL map. That is handled by LazyMapObjectInspector.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive |
---|
bytes, length, start |
Constructor Summary | |
---|---|
protected |
LazyMap(TypeInfo typeInfo)
Construct a LazyMap object with the TypeInfo. |
Method Summary | |
---|---|
protected void |
enlargeArrays()
Enlarge the size of arrays storing information for the elements inside the array. |
Map<Object,Object> |
getMap(byte itemSeparator,
byte keyValueSeparator,
org.apache.hadoop.io.Text nullSequence)
Return the map object representing this LazyMap. |
int |
getMapSize(byte itemSeparator,
byte keyValueSeparator,
org.apache.hadoop.io.Text nullSequence)
Get the size of the map represented by this LazyMap. |
Object |
getMapValueElement(byte itemSeparator,
byte keyValueSeparator,
org.apache.hadoop.io.Text nullSequence,
Object key)
Get the value in the map for the key. |
void |
init(ByteArrayRef bytes,
int start,
int length)
Set the row data for this LazyArray. |
Methods inherited from class org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive |
---|
getObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LazyMap(TypeInfo typeInfo)
typeInfo
- the TypeInfo representing the type of this LazyMap.Method Detail |
---|
public void init(ByteArrayRef bytes, int start, int length)
init
in interface LazyObject
init
in class LazyNonPrimitive
bytes
- The wrapper of the byte[].start
- The start position inside the bytes.length
- The length of the data, starting from "start"LazyObject.init(ByteArrayRef, int, int)
protected void enlargeArrays()
public Object getMapValueElement(byte itemSeparator, byte keyValueSeparator, org.apache.hadoop.io.Text nullSequence, Object key)
itemSeparator
- The separator between different entries.keyValueSeparator
- The separator between key and value.nullSequence
- The byte sequence representing NULL.key
- The key object that we are looking for.
public Map<Object,Object> getMap(byte itemSeparator, byte keyValueSeparator, org.apache.hadoop.io.Text nullSequence)
itemSeparator
- The separator between different entries.keyValueSeparator
- The separator between key and value.nullSequence
- The byte sequence representing NULL.
public int getMapSize(byte itemSeparator, byte keyValueSeparator, org.apache.hadoop.io.Text nullSequence)
itemSeparator
- The separator between different entries.keyValueSeparator
- The separator between key and value.nullSequence
- The byte sequence representing NULL.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |