public class HBaseSerDeHelper extends Object
HBaseSerDe
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG
Logger
|
Constructor and Description |
---|
HBaseSerDeHelper() |
Modifier and Type | Method and Description |
---|---|
static LazyObjectBase |
createLazyField(ColumnMappings.ColumnMapping[] columnMappings,
int fieldID,
ObjectInspector inspector)
Create the
lazy field |
static void |
generateColumns(Properties tbl,
List<ColumnMappings.ColumnMapping> columnsMapping,
StringBuilder sb)
Autogenerates the columns from the given serialization class
|
static void |
generateColumnTypes(Properties tbl,
List<ColumnMappings.ColumnMapping> columnsMapping,
StringBuilder sb,
org.apache.hadoop.conf.Configuration conf)
Autogenerates the column types from the given serialization class
|
static org.apache.avro.Schema |
getSchemaFromFS(String schemaFSUrl,
org.apache.hadoop.conf.Configuration conf)
Read the schema from the given hdfs url for the schema
|
public static void generateColumns(Properties tbl, List<ColumnMappings.ColumnMapping> columnsMapping, StringBuilder sb)
tbl
- the hive table propertiescolumnsMapping
- the hbase columns mapping determining hbase column families and
qualifierssb
- StringBuilder to form the list of columnsIllegalArgumentException
- if any of the given arguments was nullpublic static void generateColumnTypes(Properties tbl, List<ColumnMappings.ColumnMapping> columnsMapping, StringBuilder sb, org.apache.hadoop.conf.Configuration conf) throws SerDeException
tbl
- the hive table propertiescolumnsMapping
- the hbase columns mapping determining hbase column families and
qualifierssb
- StringBuilder to form the list of columnsconf
- configurationIllegalArgumentException
- if any of the given arguments was nullSerDeException
- if there was an error generating the column typespublic static org.apache.avro.Schema getSchemaFromFS(String schemaFSUrl, org.apache.hadoop.conf.Configuration conf) throws SerDeException
SerDeException
public static LazyObjectBase createLazyField(ColumnMappings.ColumnMapping[] columnMappings, int fieldID, ObjectInspector inspector)
lazy field
Copyright © 2017 The Apache Software Foundation. All rights reserved.