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.
|
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) |
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() |
getConfigurationErrors, initialize, shouldStoreFieldsInMetastorepublic 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 HBaseSerDe()
throws SerDeException
SerDeExceptionpublic void initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
throws SerDeException
initialize in interface Deserializerinitialize in interface Serializerinitialize in class AbstractSerDeconf - System properties. Can be null in compile timetbl - table propertiesSerDeExceptionAbstractSerDe.initialize(Configuration, Properties)public static ColumnMappings parseColumnsMapping(String columnsMappingSpec) throws SerDeException
SerDeExceptionpublic static ColumnMappings parseColumnsMapping(String columnsMappingSpec, boolean doColumnRegexMatching) throws SerDeException
SerDeExceptionpublic 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)SerDeExceptionpublic LazySerDeParameters getSerdeParams()
public HBaseSerDeParameters getHBaseSerdeParam()
public Object deserialize(org.apache.hadoop.io.Writable result) throws SerDeException
deserialize in interface Deserializerdeserialize in class AbstractSerDeresult - the HBase Result Writable containing the rowSerDeExceptionAbstractSerDe.deserialize(Writable)public ObjectInspector getObjectInspector() throws SerDeException
AbstractSerDegetObjectInspector in interface DeserializergetObjectInspector in class AbstractSerDeSerDeExceptionpublic Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
AbstractSerDegetSerializedClass in interface SerializergetSerializedClass in class AbstractSerDepublic org.apache.hadoop.io.Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException
AbstractSerDeserialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic SerDeStats getSerDeStats()
AbstractSerDegetSerDeStats in interface DeserializergetSerDeStats in interface SerializergetSerDeStats in class AbstractSerDepublic HBaseKeyFactory getKeyFactory()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.