public class CompactIndexHandler extends TableBasedIndexHandler
Constructor and Description |
---|
CompactIndexHandler() |
Modifier and Type | Method and Description |
---|---|
void |
analyzeIndexDefinition(Table baseTable,
Index index,
Table indexTable)
Requests that the handler validate an index definition and fill in
additional information about its stored representation.
|
boolean |
checkQuerySize(long querySize,
HiveConf hiveConf)
Check the size of an input query to make sure it fits within the bounds
|
void |
generateIndexQuery(List<Index> indexes,
ExprNodeDesc predicate,
ParseContext pctx,
HiveIndexQueryContext queryContext)
Generate the list of tasks required to run an index optimized sub-query for the
given predicate, using the given indexes.
|
protected Task<?> |
getIndexBuilderMapRedTask(Set<ReadEntity> inputs,
Set<WriteEntity> outputs,
List<FieldSchema> indexField,
boolean partitioned,
PartitionDesc indexTblPartDesc,
String indexTableName,
PartitionDesc baseTablePartDesc,
String baseTableName,
String dbName) |
boolean |
usesIndexTable()
Determines whether this handler implements indexes by creating an index
table.
|
generateIndexBuildTaskList, getConf, getIndexBuilderMapRedTask, getPartKVPairStringArray, setConf, setStatsDir
generateIndexQuery, getColumnNames
public void analyzeIndexDefinition(Table baseTable, Index index, Table indexTable) throws HiveException
HiveIndexHandler
baseTable
- the definition of the table being indexedindex
- the definition of the index being createdindexTable
- a partial definition of the index table to be used for storing the
index representation, or null if usesIndexTable() returns false;
the handler can augment the index's storage descriptor (e.g. with
information about input/output format) and/or the index table's
definition (typically with additional columns containing the index
representation, e.g. pointers into HDFS).HiveException
- if the index definition is invalid with respect to
either the base table or the supplied index table definitionprotected Task<?> getIndexBuilderMapRedTask(Set<ReadEntity> inputs, Set<WriteEntity> outputs, List<FieldSchema> indexField, boolean partitioned, PartitionDesc indexTblPartDesc, String indexTableName, PartitionDesc baseTablePartDesc, String baseTableName, String dbName) throws HiveException
getIndexBuilderMapRedTask
in class TableBasedIndexHandler
HiveException
public void generateIndexQuery(List<Index> indexes, ExprNodeDesc predicate, ParseContext pctx, HiveIndexQueryContext queryContext)
HiveIndexHandler
queryContext
- contains results, such as query tasks and input configurationpublic boolean checkQuerySize(long querySize, HiveConf hiveConf)
HiveIndexHandler
checkQuerySize
in interface HiveIndexHandler
checkQuerySize
in class AbstractIndexHandler
querySize
- size (in bytes) of the query in questionpublic boolean usesIndexTable()
HiveIndexHandler
usesIndexTable
in interface HiveIndexHandler
usesIndexTable
in class TableBasedIndexHandler
Copyright © 2017 The Apache Software Foundation. All rights reserved.