public class AccumuloPredicateHandler extends Object
PrimitiveComparisonFilter
Modifier and Type | Method and Description |
---|---|
Set<String> |
cOpKeyset() |
HiveStoragePredicateHandler.DecomposedPredicate |
decompose(org.apache.hadoop.conf.Configuration conf,
ExprNodeDesc desc) |
protected Object |
generateRanges(ColumnMapper columnMapper,
String hiveRowIdColumnName,
ExprNodeDesc root)
Encapsulates the traversal over some
ExprNodeDesc tree for the generation of Accumuluo
Ranges using expressions involving the Accumulo rowid-mapped Hive column |
CompareOp |
getCompareOp(String udfType,
IndexSearchCondition sc) |
Class<? extends CompareOp> |
getCompareOpClass(String udfType) |
ExprNodeDesc |
getExpression(org.apache.hadoop.conf.Configuration conf) |
static AccumuloPredicateHandler |
getInstance() |
List<org.apache.accumulo.core.client.IteratorSetting> |
getIterators(org.apache.hadoop.conf.Configuration conf,
ColumnMapper columnMapper)
Loop through search conditions and build iterator settings for predicates involving columns
other than rowID, if any.
|
PrimitiveComparison |
getPrimitiveComparison(String type,
IndexSearchCondition sc) |
Class<? extends PrimitiveComparison> |
getPrimitiveComparisonClass(String type) |
List<org.apache.accumulo.core.data.Range> |
getRanges(org.apache.hadoop.conf.Configuration conf,
ColumnMapper columnMapper)
Loop through search conditions and build ranges for predicates involving rowID column, if any.
|
List<IndexSearchCondition> |
getSearchConditions(org.apache.hadoop.conf.Configuration conf) |
Set<String> |
pComparisonKeyset() |
org.apache.accumulo.core.client.IteratorSetting |
toSetting(HiveAccumuloColumnMapping accumuloColumnMapping,
IndexSearchCondition sc)
Create an IteratorSetting for the right qualifier, constant, CompareOpt, and PrimitiveCompare
type.
|
public static AccumuloPredicateHandler getInstance()
public Set<String> cOpKeyset()
public Set<String> pComparisonKeyset()
public Class<? extends CompareOp> getCompareOpClass(String udfType) throws NoSuchCompareOpException
udfType
- GenericUDF classname to lookup matching CompareOptNoSuchCompareOpException
public CompareOp getCompareOp(String udfType, IndexSearchCondition sc) throws NoSuchCompareOpException, SerDeException
public Class<? extends PrimitiveComparison> getPrimitiveComparisonClass(String type) throws NoSuchPrimitiveComparisonException
type
- String hive column lookup matching PrimitiveCompareNoSuchPrimitiveComparisonException
public PrimitiveComparison getPrimitiveComparison(String type, IndexSearchCondition sc) throws NoSuchPrimitiveComparisonException, SerDeException
public List<org.apache.accumulo.core.data.Range> getRanges(org.apache.hadoop.conf.Configuration conf, ColumnMapper columnMapper) throws SerDeException
SerDeException
protected Object generateRanges(ColumnMapper columnMapper, String hiveRowIdColumnName, ExprNodeDesc root)
ExprNodeDesc
tree for the generation of Accumuluo
Ranges using expressions involving the Accumulo rowid-mapped Hive columncolumnMapper
- Mapping of Hive to Accumulo columns for the queryhiveRowIdColumnName
- Name of the hive column mapped to the Accumulo rowidroot
- Root of some ExprNodeDesc tree to traverse, the WHERE clausepublic List<org.apache.accumulo.core.client.IteratorSetting> getIterators(org.apache.hadoop.conf.Configuration conf, ColumnMapper columnMapper) throws SerDeException
conf
- ConfigurationSerDeException
public org.apache.accumulo.core.client.IteratorSetting toSetting(HiveAccumuloColumnMapping accumuloColumnMapping, IndexSearchCondition sc) throws SerDeException
accumuloColumnMapping
- ColumnMapping to filtersc
- IndexSearchConditionSerDeException
public ExprNodeDesc getExpression(org.apache.hadoop.conf.Configuration conf)
public List<IndexSearchCondition> getSearchConditions(org.apache.hadoop.conf.Configuration conf)
conf
- Configurationpublic HiveStoragePredicateHandler.DecomposedPredicate decompose(org.apache.hadoop.conf.Configuration conf, ExprNodeDesc desc)
conf
- Configurationdesc
- predicate expression node.Copyright © 2017 The Apache Software Foundation. All rights reserved.