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_PREFIX_HIDE
Defines if the prefix column from hbase should be hidden.
|
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.slf4j.Logger |
LOG |
static String |
SERIALIZATION_TYPE
Defines the type for a column.
|
configuration, log, partitionProperties, properties, tableProperties
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() |
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 configuration,
Properties tableProperties,
Properties partitionProperties)
Initialize the SerDe.
|
static ColumnMappings |
parseColumnsMapping(String columnsMappingSpec) |
static ColumnMappings |
parseColumnsMapping(String columnsMappingSpec,
boolean doColumnRegexMatching) |
static ColumnMappings |
parseColumnsMapping(String columnsMappingSpec,
boolean doColumnRegexMatching,
boolean hideColumnPrefix)
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() |
getColumnComments, getColumnNames, getColumnTypes, getConfiguration, getPartitionColumnComments, getPartitionColumnNames, getPartitionColumnTypes, getSerDeStats, parseColumnComments, parseColumnNames, parseColumnNames, parseColumnTypes, parseColumnTypes, shouldStoreFieldsInMetastore
public static final org.slf4j.Logger 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 static final String HBASE_COLUMNS_PREFIX_HIDE
public String toString()
toString
in class AbstractSerDe
public void initialize(org.apache.hadoop.conf.Configuration configuration, Properties tableProperties, Properties partitionProperties) throws SerDeException
AbstractSerDe
initialize
in class AbstractSerDe
configuration
- Hadoop configurationtableProperties
- Table propertiespartitionProperties
- Partition properties (may be null
if
table has no partitions)SerDeException
- if SerDe fails to initializepublic static ColumnMappings parseColumnsMapping(String columnsMappingSpec) throws SerDeException
SerDeException
public static ColumnMappings parseColumnsMapping(String columnsMappingSpec, boolean doColumnRegexMatching) throws SerDeException
SerDeException
public static ColumnMappings parseColumnsMapping(String columnsMappingSpec, boolean doColumnRegexMatching, boolean hideColumnPrefix) throws SerDeException
columnsMappingSpec
- string hbase.columns.mapping specified when creating tabledoColumnRegexMatching
- whether to do a regex matching on the columns or nothideColumnPrefix
- whether to hide a prefix of column mapping in key name in a map (works only if @doColumnRegexMatching is true)SerDeException
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
AbstractSerDe.deserialize(Writable)
public ObjectInspector getObjectInspector() throws SerDeException
Deserializer
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
Serializer
serialize
in interface Serializer
serialize
in class AbstractSerDe
SerDeException
public HBaseKeyFactory getKeyFactory()
Copyright © 2022 The Apache Software Foundation. All rights reserved.