public class AccumuloStorageHandler extends DefaultStorageHandler implements HiveMetaHook, HiveStoragePredicateHandler
HiveStoragePredicateHandler.DecomposedPredicate
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.conf.Configuration |
conf |
protected AccumuloConnectionParameters |
connectionParams |
protected HiveAccumuloHelper |
helper |
protected AccumuloPredicateHandler |
predicateHandler |
Constructor and Description |
---|
AccumuloStorageHandler() |
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 table,
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 desc,
Map<String,String> jobProps)
Push down table properties into the JobConf.
|
HiveStoragePredicateHandler.DecomposedPredicate |
decomposePredicate(org.apache.hadoop.mapred.JobConf conf,
Deserializer deserializer,
ExprNodeDesc desc)
Gives the storage handler a chance to decompose a predicate.
|
HiveAuthorizationProvider |
getAuthorizationProvider()
Returns the implementation specific authorization provider
|
org.apache.hadoop.conf.Configuration |
getConf() |
Class<? extends org.apache.hadoop.mapred.InputFormat> |
getInputFormatClass() |
HiveMetaHook |
getMetaHook() |
Class<? extends org.apache.hadoop.mapred.OutputFormat> |
getOutputFormatClass() |
Class<? extends SerDe> |
getSerDeClass() |
protected String |
getTableName(Table table) |
protected String |
getTableName(TableDesc tableDesc) |
protected boolean |
isExternalTable(Table table) |
void |
preCreateTable(Table table)
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) |
toString
protected AccumuloPredicateHandler predicateHandler
protected AccumuloConnectionParameters connectionParams
protected org.apache.hadoop.conf.Configuration conf
protected HiveAccumuloHelper helper
public void configureTableJobProperties(TableDesc desc, Map<String,String> jobProps)
configureTableJobProperties
in interface HiveStorageHandler
configureTableJobProperties
in class DefaultStorageHandler
desc
- Hive table descriptionjobProps
- Properties that will be added to the JobConf by Hiveprotected String getTableName(Table table) throws MetaException
MetaException
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
getConf
in class DefaultStorageHandler
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class DefaultStorageHandler
public Class<? extends SerDe> getSerDeClass()
getSerDeClass
in interface HiveStorageHandler
getSerDeClass
in class DefaultStorageHandler
SerDe
public HiveMetaHook getMetaHook()
getMetaHook
in interface HiveStorageHandler
getMetaHook
in class DefaultStorageHandler
public HiveAuthorizationProvider getAuthorizationProvider() throws HiveException
HiveStorageHandler
getAuthorizationProvider
in interface HiveStorageHandler
getAuthorizationProvider
in class DefaultStorageHandler
HiveException
public void configureInputJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
HiveStorageHandler
configureInputJobProperties
in interface HiveStorageHandler
configureInputJobProperties
in class DefaultStorageHandler
tableDesc
- descriptor for the table being accessedjobProperties
- receives properties copied or transformed
from the table propertiespublic void configureOutputJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
HiveStorageHandler
configureOutputJobProperties
in interface HiveStorageHandler
configureOutputJobProperties
in class DefaultStorageHandler
tableDesc
- descriptor for the table being accessedjobProperties
- receives properties copied or transformed
from the table propertiespublic Class<? extends org.apache.hadoop.mapred.InputFormat> getInputFormatClass()
getInputFormatClass
in interface HiveStorageHandler
getInputFormatClass
in class DefaultStorageHandler
InputFormat
public Class<? extends org.apache.hadoop.mapred.OutputFormat> getOutputFormatClass()
getOutputFormatClass
in interface HiveStorageHandler
getOutputFormatClass
in class DefaultStorageHandler
OutputFormat
public void preCreateTable(Table table) throws MetaException
HiveMetaHook
preCreateTable
in interface HiveMetaHook
table
- new table definitionMetaException
protected boolean isExternalTable(Table table)
public void rollbackCreateTable(Table table) throws MetaException
HiveMetaHook
rollbackCreateTable
in interface HiveMetaHook
table
- new table definitionMetaException
public void commitCreateTable(Table table) throws MetaException
HiveMetaHook
commitCreateTable
in interface HiveMetaHook
table
- new table definitionMetaException
public void commitDropTable(Table table, boolean deleteData) throws MetaException
HiveMetaHook
commitDropTable
in interface HiveMetaHook
table
- table definitiondeleteData
- whether to delete data as well; this should typically
be ignored in the case of an external tableMetaException
public void preDropTable(Table table) throws MetaException
HiveMetaHook
preDropTable
in interface HiveMetaHook
table
- table definitionMetaException
public void rollbackDropTable(Table table) throws MetaException
HiveMetaHook
rollbackDropTable
in interface HiveMetaHook
table
- table definitionMetaException
public HiveStoragePredicateHandler.DecomposedPredicate decomposePredicate(org.apache.hadoop.mapred.JobConf conf, Deserializer deserializer, ExprNodeDesc desc)
HiveStoragePredicateHandler
x = 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 HiveStoragePredicateHandler
conf
- contains a job configuration matching the one that
will later be passed to getRecordReader and getSplitsdeserializer
- deserializer which will be used when
fetching rowsdesc
- predicate to be decomposedpublic void configureJobConf(TableDesc tableDesc, org.apache.hadoop.mapred.JobConf jobConf)
HiveStorageHandler
configureJobConf
in interface HiveStorageHandler
configureJobConf
in class DefaultStorageHandler
tableDesc
- descriptor for the table being accessedCopyright © 2017 The Apache Software Foundation. All rights reserved.