public class HBaseStorageHandler extends DefaultStorageHandler implements HiveStoragePredicateHandler
HiveStoragePredicateHandler.DecomposedPredicate
HiveStorageHandler.AcidSupportType
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PREFIX |
DEFAULT_ALLOWED_ALTER_OPS
Constructor and Description |
---|
HBaseStorageHandler() |
Modifier and Type | Method and Description |
---|---|
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 AbstractSerDe> |
getSerDeClass() |
URI |
getURIForAuth(Table table)
Constructs a URI for authorization purposes using the HMS table object
|
static boolean |
isHBaseGenerateHFiles(org.apache.hadoop.conf.Configuration conf)
Return true when HBaseStorageHandler should generate hfiles instead of operate against the
online table.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
configureInputJobCredentials, getAuthorizationProvider, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acidSelectColumns, acidSortColumns, acidVirtualColumns, addDynamicSplitPruningEdge, alwaysUnpartitioned, areSnapshotsSupported, canProvideBasicStatistics, commitInMoveTask, createDPContext, directInsertCTAS, executeOperation, getBasicStatistics, getCurrentSnapshotContext, getFileFormatPropertyKey, getLockType, getOperatorDescProperties, getPartitionTransformSpec, getStorageHandlerInfo, isAllowedAlterOperation, isMetadataTableSupported, isTimeTravelAllowed, isValidMetadataTable, prepareAlterTableEnvironmentContext, sortColumns, storageHandlerCommit, supportsAcidOperations, supportsPartitionTransform, supportsSortColumns, supportsTruncateOnNonNativeTables, validateSinkDesc
public static final String DEFAULT_PREFIX
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
getConf
in class DefaultStorageHandler
public org.apache.hadoop.conf.Configuration getJobConf()
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
setConf
in class DefaultStorageHandler
public 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 Class<? extends AbstractSerDe> getSerDeClass()
getSerDeClass
in interface HiveStorageHandler
getSerDeClass
in class DefaultStorageHandler
AbstractSerDe
public HiveMetaHook getMetaHook()
getMetaHook
in interface HiveStorageHandler
getMetaHook
in class DefaultStorageHandler
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 void configureTableJobProperties(TableDesc tableDesc, Map<String,String> jobProperties)
HiveStorageHandler
configureTableJobProperties
in interface HiveStorageHandler
configureTableJobProperties
in class DefaultStorageHandler
tableDesc
- descriptor for the table being accessedjobProperties
- receives properties copied or transformed
from the table propertiespublic URI getURIForAuth(Table table) throws URISyntaxException
HiveStorageHandler
getURIForAuth
in interface HiveStorageHandler
table
- The HMS table objectURISyntaxException
public static boolean isHBaseGenerateHFiles(org.apache.hadoop.conf.Configuration conf)
public 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 accessedjobConf
- jobConf for MapReduce jobpublic HiveStoragePredicateHandler.DecomposedPredicate decomposePredicate(org.apache.hadoop.mapred.JobConf jobConf, Deserializer deserializer, ExprNodeDesc predicate)
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
jobConf
- 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 © 2022 The Apache Software Foundation. All rights reserved.