org.apache.hadoop.hive.hbase
Class LazyHBaseRow
java.lang.Object
org.apache.hadoop.hive.serde2.lazy.LazyObjectBase
org.apache.hadoop.hive.serde2.lazy.LazyObject<OI>
org.apache.hadoop.hive.serde2.lazy.LazyNonPrimitive<LazySimpleStructObjectInspector>
org.apache.hadoop.hive.serde2.lazy.LazyStruct
org.apache.hadoop.hive.hbase.LazyHBaseRow
- All Implemented Interfaces:
- SerDeStatsStruct
public class LazyHBaseRow
- extends LazyStruct
LazyObject for storing an HBase row. The field of an HBase row can be
primitive or non-primitive.
| Fields inherited from class org.apache.hadoop.hive.serde2.lazy.LazyObject |
oi |
|
Method Summary |
Object |
getField(int fieldID)
Get one field out of the HBase row. |
ArrayList<Object> |
getFieldsAsList()
Get the values of the fields as an ArrayList. |
Object |
getObject()
|
void |
init(org.apache.hadoop.hbase.client.Result r,
List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> columnsMapping)
Set the HBase row data(a Result writable) for this LazyStruct. |
void |
init(org.apache.hadoop.hbase.client.Result r,
List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> columnsMapping,
Object compositeKeyObj)
Set the HBase row data(a Result writable) for this LazyStruct. |
LazyHBaseRow
public LazyHBaseRow(LazySimpleStructObjectInspector oi)
- Construct a LazyHBaseRow object with the ObjectInspector.
init
public void init(org.apache.hadoop.hbase.client.Result r,
List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> columnsMapping)
- Set the HBase row data(a Result writable) for this LazyStruct.
- See Also:
LazyHBaseRow#init(Result)
init
public void init(org.apache.hadoop.hbase.client.Result r,
List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> columnsMapping,
Object compositeKeyObj)
- Set the HBase row data(a Result writable) for this LazyStruct.
- Parameters:
compositeKeyClass - custom implementation to interpret the composite key- See Also:
LazyHBaseRow#init(Result)
getField
public Object getField(int fieldID)
- Get one field out of the HBase row.
If the field is a primitive field, return the actual object.
Otherwise return the LazyObject. This is because PrimitiveObjectInspector
does not have control over the object used by the user - the user simply
directly uses the Object instead of going through
Object PrimitiveObjectInspector.get(Object).
- Overrides:
getField in class LazyStruct
- Parameters:
fieldID - The field ID
- Returns:
- The field as a LazyObject
getFieldsAsList
public ArrayList<Object> getFieldsAsList()
- Get the values of the fields as an ArrayList.
- Overrides:
getFieldsAsList in class LazyStruct
- Returns:
- The values of the fields as an ArrayList.
getObject
public Object getObject()
- Overrides:
getObject in class LazyStruct
Copyright © 2014 The Apache Software Foundation. All rights reserved.