|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.serde2.lazy.LazyObjectBase
org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryObject<OI>
org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryNonPrimitive<LazyBinaryMapObjectInspector>
org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryMap
public class LazyBinaryMap
LazyBinaryMap is serialized as follows: start A b c b c b c end bytes[] -> |--------|---|---|---|---| ... |---|---| Section A is the null-bytes. Suppose the map has N key-value pairs, then there are (N*2+7)/8 bytes used as null-bytes. Each bit corresponds to a key or a value and it indicates whether that key or value is null (0) or not null (1). After A, all the bytes are actual serialized data of the map, which are key-value pairs. b represent the keys and c represent the values. Each of them is again a LazyBinaryObject.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryNonPrimitive |
---|
bytes, length, start |
Constructor Summary | |
---|---|
protected |
LazyBinaryMap(LazyBinaryMapObjectInspector oi)
|
Method Summary | |
---|---|
protected void |
adjustArraySize(int newSize)
Adjust the size of arrays: keyStart, keyLength valueStart, valueLength keyInited, keyIsNull valueInited, valueIsNull. |
Map<Object,Object> |
getMap()
Return the map object representing this LazyBinaryMap. |
int |
getMapSize()
Get the size of the map represented by this LazyBinaryMap. |
Object |
getMapValueElement(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 LazyBinaryMap. |
Methods inherited from class org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryNonPrimitive |
---|
getObject, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected LazyBinaryMap(LazyBinaryMapObjectInspector oi)
Method Detail |
---|
public void init(ByteArrayRef bytes, int start, int length)
init
in class LazyBinaryNonPrimitive<LazyBinaryMapObjectInspector>
bytes
- The wrapper of the byte[].start
- The start position inside the bytes.length
- The length of the data, starting from "start"LazyObjectBase.init(ByteArrayRef, int, int)
protected void adjustArraySize(int newSize)
public Object getMapValueElement(Object key)
key
- The key object that we are looking for.
public Map<Object,Object> getMap()
public int getMapSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |