|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.hadoop.hive.serde2.AbstractSerDe
org.apache.hadoop.hive.hbase.HBaseSerDe
public class HBaseSerDe
HBaseSerDe can be used to serialize object into an HBase table and deserialize objects from an HBase table.
| Field Summary | |
|---|---|
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_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_TABLE_DEFAULT_STORAGE_TYPE
|
static String |
HBASE_TABLE_NAME
|
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
HBaseSerDe()
|
|
| Method Summary | |
|---|---|
Object |
deserialize(org.apache.hadoop.io.Writable result)
Deserialize a row from the HBase Result writable to a LazyObject |
ObjectInspector |
getObjectInspector()
|
static int |
getRowKeyColumnOffset(List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> columnsMapping)
|
SerDeStats |
getSerDeStats()
|
Class<? extends org.apache.hadoop.io.Writable> |
getSerializedClass()
|
void |
initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
Initialize the SerDe given parameters. |
static boolean |
isRowKeyColumn(String hbaseColumnName)
|
boolean |
isUseJSONSerialize()
|
static List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> |
parseColumnsMapping(String columnsMappingSpec)
Parses the HBase columns mapping specifier to identify the column families, qualifiers and also caches the byte arrays corresponding to them. |
static List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> |
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)
|
void |
setUseJSONSerialize(boolean useJSONSerialize)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
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_PUT_TIMESTAMP
public static final String HBASE_COMPOSITE_KEY_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_COLUMNS_REGEX_MATCHING
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public HBaseSerDe()
throws SerDeException
SerDeException| Method Detail |
|---|
public String toString()
toString in class Object
public void initialize(org.apache.hadoop.conf.Configuration conf,
Properties tbl)
throws SerDeException
initialize in interface Deserializerinitialize in interface Serializerinitialize in class AbstractSerDeSerDeExceptionSerDe#initialize(Configuration, Properties)
public static List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> parseColumnsMapping(String columnsMappingSpec)
throws SerDeException
columnsMappingSpec - string hbase.columns.mapping specified when creating table
SerDeException
public static List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> 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 not
SerDeExceptionpublic static boolean isRowKeyColumn(String hbaseColumnName)
public Object deserialize(org.apache.hadoop.io.Writable result)
throws SerDeException
deserialize in interface Deserializerdeserialize in class AbstractSerDeresult - the HBase Result Writable containing the row
SerDeExceptionSerDe#deserialize(Writable)
public ObjectInspector getObjectInspector()
throws SerDeException
getObjectInspector in interface DeserializergetObjectInspector in class AbstractSerDeSerDeExceptionpublic Class<? extends org.apache.hadoop.io.Writable> getSerializedClass()
getSerializedClass in interface SerializergetSerializedClass in class AbstractSerDe
public org.apache.hadoop.io.Writable serialize(Object obj,
ObjectInspector objInspector)
throws SerDeException
serialize in interface Serializerserialize in class AbstractSerDeSerDeExceptionpublic boolean isUseJSONSerialize()
public void setUseJSONSerialize(boolean useJSONSerialize)
useJSONSerialize - the useJSONSerialize to setpublic SerDeStats getSerDeStats()
getSerDeStats in interface DeserializergetSerDeStats in interface SerializergetSerDeStats in class AbstractSerDe
public static int getRowKeyColumnOffset(List<org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping> columnsMapping)
throws SerDeException
SerDeException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||