public class HBaseSerDe extends AbstractSerDe
Modifier and Type | Field and Description |
---|---|
static String |
HBASE_AUTOGENERATE_STRUCT |
static String |
HBASE_COLUMNS_MAPPING |
static String |
HBASE_COLUMNS_REGEX_MATCHING
Determines whether a regex matching should be done on the columns or not.
|
static String |
HBASE_COMPOSITE_KEY_CLASS |
static String |
HBASE_COMPOSITE_KEY_FACTORY |
static String |
HBASE_COMPOSITE_KEY_TYPES |
static String |
HBASE_KEY_COL |
static String |
HBASE_PUT_TIMESTAMP |
static String |
HBASE_SCAN_BATCH |
static String |
HBASE_SCAN_CACHE |
static String |
HBASE_SCAN_CACHEBLOCKS |
static String |
HBASE_STRUCT_SERIALIZER_CLASS |
static String |
HBASE_TABLE_DEFAULT_STORAGE_TYPE |
static String |
HBASE_TABLE_NAME |
static String |
HBASE_TIMESTAMP_COL |
static org.apache.commons.logging.Log |
LOG |
static String |
SERIALIZATION_TYPE
Defines the type for a column.
|
configErrors
Constructor and Description |
---|
HBaseSerDe() |
Modifier and Type | Method and Description |
---|---|
static void |
configureJobConf(TableDesc tableDesc,
org.apache.hadoop.mapred.JobConf jobConf) |
Object |
deserialize(org.apache.hadoop.io.Writable result)
Deserialize a row from the HBase Result writable to a LazyObject
|
HBaseSerDeParameters |
getHBaseSerdeParam() |
HBaseKeyFactory |
getKeyFactory() |
ObjectInspector |
getObjectInspector()
Get the object inspector that can be used to navigate through the internal
structure of the Object returned from deserialize(...).
|
LazySerDeParameters |
getSerdeParams() |
SerDeStats |
getSerDeStats()
Returns statistics collected when serializing
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
Returns the Writable class that would be returned by the serialize method.
|
void |
initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
Initialize the SerDe given parameters.
|
static ColumnMappings |
parseColumnsMapping(String columnsMappingSpec) |
static ColumnMappings |
parseColumnsMapping(String columnsMappingSpec,
boolean doColumnRegexMatching)
Parses the HBase columns mapping specifier to identify the column families, qualifiers
and also caches the byte arrays corresponding to them.
|
org.apache.hadoop.io.Writable |
serialize(Object obj,
ObjectInspector objInspector)
Serialize an object by navigating inside the Object with the
ObjectInspector.
|
String |
toString() |
getConfigurationErrors, initialize
public static final org.apache.commons.logging.Log LOG
public static final String HBASE_COLUMNS_MAPPING
public static final String HBASE_TABLE_NAME
public static final String HBASE_TABLE_DEFAULT_STORAGE_TYPE
public static final String HBASE_KEY_COL
public static final String HBASE_TIMESTAMP_COL
public static final String HBASE_PUT_TIMESTAMP
public static final String HBASE_COMPOSITE_KEY_CLASS
public static final String HBASE_COMPOSITE_KEY_TYPES
public static final String HBASE_COMPOSITE_KEY_FACTORY
public static final String HBASE_STRUCT_SERIALIZER_CLASS
public static final String HBASE_SCAN_CACHE
public static final String HBASE_SCAN_CACHEBLOCKS
public static final String HBASE_SCAN_BATCH
public static final String HBASE_AUTOGENERATE_STRUCT
public static final String HBASE_COLUMNS_REGEX_MATCHING
public static final String SERIALIZATION_TYPE
public HBaseSerDe() throws SerDeException
SerDeException
public void initialize(org.apache.hadoop.conf.Configuration conf, Properties tbl) throws SerDeException
initialize
in interface Deserializer
initialize
in interface Serializer
initialize
in class AbstractSerDe
conf
- System properties. Can be null in compile timetbl
- table propertiesSerDeException
Deserializer.initialize(Configuration, Properties)
public static ColumnMappings parseColumnsMapping(String columnsMappingSpec) throws SerDeException
SerDeException
public static ColumnMappings parseColumnsMapping(String columnsMappingSpec, boolean doColumnRegexMatching) throws SerDeException
columnsMappingSpec
- string hbase.columns.mapping specified when creating tabledoColumnRegexMatching
- whether to do a regex matching on the columns or notSerDeException
public LazySerDeParameters getSerdeParams()
public HBaseSerDeParameters getHBaseSerdeParam()
public Object deserialize(org.apache.hadoop.io.Writable result) throws SerDeException
deserialize
in interface Deserializer
deserialize
in class AbstractSerDe
result
- the HBase Result Writable containing the rowSerDeException
Deserializer.deserialize(Writable)
public ObjectInspector getObjectInspector() throws SerDeException
AbstractSerDe
getObjectInspector
in interface Deserializer
getObjectInspector
in class AbstractSerDe
SerDeException
public Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
AbstractSerDe
getSerializedClass
in interface Serializer
getSerializedClass
in class AbstractSerDe
public org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
AbstractSerDe
serialize
in interface Serializer
serialize
in class AbstractSerDe
SerDeException
public SerDeStats getSerDeStats()
AbstractSerDe
getSerDeStats
in interface Deserializer
getSerDeStats
in interface Serializer
getSerDeStats
in class AbstractSerDe
public HBaseKeyFactory getKeyFactory()
Copyright © 2017 The Apache Software Foundation. All rights reserved.