public class HBaseCompositeKey extends LazyStruct
LazyStruct.getField(int)
method where fieldID corresponds to the ID of a
key in the composite key.
For example, for a composite key "/part1/part2/part3", part1 will have an id 0, part2 will have an id 1 and part3 will have an id 2. Custom implementations of getField(fieldID) should return the value corresponding to that fieldID. So, for the above example, the value returned for getField(0) should be part1, getField(1) should be part2 and getField(2) should be part3.
All custom implementation are expected to have a constructor of the form:
MyCustomCompositeKey(LazySimpleStructObjectInspector oi, Properties tbl, Configuration conf)
bytes, length, start
isNull, oi
Constructor and Description |
---|
HBaseCompositeKey(LazySimpleStructObjectInspector oi) |
Modifier and Type | Method and Description |
---|---|
ArrayList<Object> |
getFieldsAsList()
Get the values of the fields as an ArrayList.
|
Map<String,String> |
getParts()
Return the different parts of the key.
|
LazyObject<? extends ObjectInspector> |
toLazyObject(int fieldID,
byte[] bytes)
Create an initialize a
LazyObject with the given bytes for the given fieldID. |
createLazyField, getBytes, getField, getFieldInited, getFields, getParsed, getRawDataSerializedSize, init, initLazyFields, parseMultiDelimit, setFieldInited, setFields, setParsed
hashCode, isNull, isNull
getInspector, getObject, setInspector, setNull
public HBaseCompositeKey(LazySimpleStructObjectInspector oi)
public ArrayList<Object> getFieldsAsList()
LazyStruct
getFieldsAsList
in interface StructObject
getFieldsAsList
in class LazyStruct
public LazyObject<? extends ObjectInspector> toLazyObject(int fieldID, byte[] bytes)
LazyObject
with the given bytes for the given fieldID.fieldID
- field for which the object is to be createdbytes
- value with which the object is to be initialized withLazyObject
Copyright © 2017 The Apache Software Foundation. All rights reserved.