public class HBaseStorageHandler extends DefaultStorageHandler implements HiveMetaHook, HiveStoragePredicateHandler
HiveStoragePredicateHandler.DecomposedPredicate| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_PREFIX |
| Constructor and Description |
|---|
HBaseStorageHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
commitCreateTable(Table table)
Called after successfully adding a new table definition to the metastore
during CREATE TABLE.
|
void |
commitDropTable(Table tbl,
boolean deleteData)
Called after successfully removing a table definition from the metastore
during DROP TABLE.
|
void |
configureInputJobProperties(TableDesc tableDesc,
Map<String,String> jobProperties)
This method is called to allow the StorageHandlers the chance
to populate the JobContext.getConfiguration() with properties that
maybe be needed by the handler's bundled artifacts (ie InputFormat, SerDe, etc).
|
void |
configureJobConf(TableDesc tableDesc,
org.apache.hadoop.mapred.JobConf jobConf)
Called just before submitting MapReduce job.
|
void |
configureOutputJobProperties(TableDesc tableDesc,
Map<String,String> jobProperties)
This method is called to allow the StorageHandlers the chance
to populate the JobContext.getConfiguration() with properties that
maybe be needed by the handler's bundled artifacts (ie InputFormat, SerDe, etc).
|
void |
configureTableJobProperties(TableDesc tableDesc,
Map<String,String> jobProperties)
Deprecated use configureInputJobProperties/configureOutputJobProperties
methods instead.
|
HiveStoragePredicateHandler.DecomposedPredicate |
decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf,
Deserializer deserializer,
ExprNodeDesc predicate)
Gives the storage handler a chance to decompose a predicate.
|
static HiveStoragePredicateHandler.DecomposedPredicate |
decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf,
HBaseSerDe hBaseSerDe,
ExprNodeDesc predicate) |
org.apache.hadoop.conf.Configuration |
getConf() |
Class<? extends org.apache.hadoop.mapred.InputFormat> |
getInputFormatClass() |
org.apache.hadoop.conf.Configuration |
getJobConf() |
HiveMetaHook |
getMetaHook() |
Class<? extends org.apache.hadoop.mapred.OutputFormat> |
getOutputFormatClass() |
Class<? extends SerDe> |
getSerDeClass() |
static boolean |
isHBaseGenerateHFiles(org.apache.hadoop.conf.Configuration conf)
Return true when HBaseStorageHandler should generate hfiles instead of operate against the
online table.
|
void |
preCreateTable(Table tbl)
Called before a new table definition is added to the metastore
during CREATE TABLE.
|
void |
preDropTable(Table table)
Called before a table definition is removed from the metastore
during DROP TABLE.
|
void |
rollbackCreateTable(Table table)
Called after failure adding a new table definition to the metastore
during CREATE TABLE.
|
void |
rollbackDropTable(Table table)
Called after failure removing a table definition from the metastore
during DROP TABLE.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
getAuthorizationProvider, toStringpublic static final String DEFAULT_PREFIX
public void preDropTable(Table table) throws MetaException
HiveMetaHookpreDropTable in interface HiveMetaHooktable - table definitionMetaExceptionpublic void rollbackDropTable(Table table) throws MetaException
HiveMetaHookrollbackDropTable in interface HiveMetaHooktable - table definitionMetaExceptionpublic void commitDropTable(Table tbl, boolean deleteData) throws MetaException
HiveMetaHookcommitDropTable in interface HiveMetaHooktbl - table definitiondeleteData - whether to delete data as well; this should typically
be ignored in the case of an external tableMetaExceptionpublic void preCreateTable(Table tbl) throws MetaException
HiveMetaHookpreCreateTable in interface HiveMetaHooktbl - new table definitionMetaExceptionpublic void rollbackCreateTable(Table table) throws MetaException
HiveMetaHookrollbackCreateTable in interface HiveMetaHooktable - new table definitionMetaExceptionpublic void commitCreateTable(Table table) throws MetaException
HiveMetaHookcommitCreateTable in interface HiveMetaHooktable - new table definitionMetaExceptionpublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.ConfigurablegetConf in class DefaultStorageHandlerpublic org.apache.hadoop.conf.Configuration getJobConf()
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.ConfigurablesetConf in class DefaultStorageHandlerpublic Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass()
getInputFormatClass in interface HiveStorageHandlergetInputFormatClass in class DefaultStorageHandlerInputFormatpublic Class<? extends org.apache.hadoop.mapred.OutputFormat> getOutputFormatClass()
getOutputFormatClass in interface HiveStorageHandlergetOutputFormatClass in class DefaultStorageHandlerOutputFormatpublic Class<? extends SerDe> getSerDeClass()
getSerDeClass in interface HiveStorageHandlergetSerDeClass in class DefaultStorageHandlerSerDepublic HiveMetaHook getMetaHook()
getMetaHook in interface HiveStorageHandlergetMetaHook in class DefaultStorageHandlerpublic void configureInputJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
HiveStorageHandlerconfigureInputJobProperties in interface HiveStorageHandlerconfigureInputJobProperties in class DefaultStorageHandlertableDesc - descriptor for the table being accessedjobProperties - receives properties copied or transformed
from the table propertiespublic void configureOutputJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
HiveStorageHandlerconfigureOutputJobProperties in interface HiveStorageHandlerconfigureOutputJobProperties in class DefaultStorageHandlertableDesc - descriptor for the table being accessedjobProperties - receives properties copied or transformed
from the table propertiespublic void configureTableJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
HiveStorageHandlerconfigureTableJobProperties in interface HiveStorageHandlerconfigureTableJobProperties in class DefaultStorageHandlertableDesc - descriptor for the table being accessedjobProperties - receives properties copied or transformed
from the table propertiespublic static boolean isHBaseGenerateHFiles(org.apache.hadoop.conf.Configuration conf)
public void configureJobConf(TableDesc tableDesc, org.apache.hadoop.mapred.JobConf jobConf)
HiveStorageHandlerconfigureJobConf in interface HiveStorageHandlerconfigureJobConf in class DefaultStorageHandlertableDesc - descriptor for the table being accessedpublic HiveStoragePredicateHandler.DecomposedPredicate decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf, Deserializer deserializer, ExprNodeDesc predicate)
HiveStoragePredicateHandlerx = 2 AND upper(y)='YUM', the storage handler
might be able to handle x = 2 but leave the "residual"
upper(y)='YUM' for Hive to deal with. The breakdown
need not be non-overlapping; for example, given the
predicate x LIKE 'a%b', the storage handler might
be able to evaluate the prefix search x LIKE 'a%', leaving
x LIKE '%b' as the residual.decomposePredicate in interface HiveStoragePredicateHandlerjobConf - contains a job configuration matching the one that
will later be passed to getRecordReader and getSplitsdeserializer - deserializer which will be used when
fetching rowspredicate - predicate to be decomposedpublic static HiveStoragePredicateHandler.DecomposedPredicate decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf, HBaseSerDe hBaseSerDe, ExprNodeDesc predicate)
Copyright © 2017 The Apache Software Foundation. All rights reserved.