public class HBaseStructValue extends LazyStruct
LazyStruct.getField(int)
method where fieldID corresponds to the ID of a value in the
value structure.
For example, for a value structure "/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 implementation are expected to have a constructor of the form
MyCustomStructObject(LazySimpleStructObjectInspector oi, Properties props, Configuration conf, ColumnMapping colMap)
Modifier and Type | Field and Description |
---|---|
protected String |
familyName
The column family name
|
protected String |
qualifierName
The column qualifier name
|
bytes, length, start
isNull, oi
Constructor and Description |
---|
HBaseStructValue(LazySimpleStructObjectInspector oi) |
Modifier and Type | Method and Description |
---|---|
ArrayList<Object> |
getFieldsAsList()
Get the values of the fields as an ArrayList.
|
void |
init(ByteArrayRef bytes,
int start,
int length,
String familyName,
String qualifierName)
Set the row data for this LazyStruct.
|
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
protected String familyName
protected String qualifierName
public HBaseStructValue(LazySimpleStructObjectInspector oi)
public void init(ByteArrayRef bytes, int start, int length, String familyName, String qualifierName)
familyName
- The column family namequalifierName
- The column qualifier nameLazyObject.init(ByteArrayRef, int, int)
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.