public class DefaultHBaseValueFactory extends Object implements HBaseValueFactory
HBaseValueFactory
Modifier and Type | Field and Description |
---|---|
protected ColumnMappings |
columnMappings |
protected org.apache.hadoop.conf.Configuration |
conf |
protected HBaseSerDeParameters |
hbaseParams |
protected Properties |
properties |
protected LazySerDeParameters |
serdeParams |
Constructor and Description |
---|
DefaultHBaseValueFactory(int fieldID) |
Modifier and Type | Method and Description |
---|---|
LazyObjectBase |
createValueObject(ObjectInspector inspector)
create custom object for hbase value
|
ObjectInspector |
createValueObjectInspector(TypeInfo type)
create custom object inspector for the value
|
void |
init(HBaseSerDeParameters hbaseParams,
org.apache.hadoop.conf.Configuration conf,
Properties properties)
Initialize factory with properties
|
byte[] |
serializeValue(Object object,
StructField field)
Serialize the given hive object
|
protected LazySerDeParameters serdeParams
protected ColumnMappings columnMappings
protected HBaseSerDeParameters hbaseParams
protected Properties properties
protected org.apache.hadoop.conf.Configuration conf
public void init(HBaseSerDeParameters hbaseParams, org.apache.hadoop.conf.Configuration conf, Properties properties) throws SerDeException
HBaseValueFactory
init
in interface HBaseValueFactory
hbaseParams
- the hbase parameters
conf
- the hadoop configuration
properties
- the custom Properties
SerDeException
- if there was an issue initializing the factorypublic ObjectInspector createValueObjectInspector(TypeInfo type) throws SerDeException
HBaseValueFactory
createValueObjectInspector
in interface HBaseValueFactory
type
- type informationSerDeException
- if there was an issue creating the object inspector
public LazyObjectBase createValueObject(ObjectInspector inspector) throws SerDeException
HBaseValueFactory
createValueObject
in interface HBaseValueFactory
inspector
- OI create by HBaseKeyFactory.createKeyObjectInspector(org.apache.hadoop.hive.serde2.typeinfo.TypeInfo)
SerDeException
public byte[] serializeValue(Object object, StructField field) throws IOException
HBaseValueFactory
serializeValue
in interface HBaseValueFactory
object
- the object to be serializedfield
- the StructField
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.