|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HiveIndexHandler
HiveIndexHandler defines a pluggable interface for adding new index handlers to Hive.
| Method Summary | |
|---|---|
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 inputSize,
HiveConf conf)
Check the size of an input query to make sure it fits within the bounds |
List<Task<?>> |
generateIndexBuildTaskList(Table baseTbl,
Index index,
List<Partition> indexTblPartitions,
List<Partition> baseTblPartitions,
Table indexTbl,
Set<ReadEntity> inputs,
Set<WriteEntity> outputs)
Requests that the handler generate a plan for building the index; the plan should read the base table and write out the index representation. |
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. |
boolean |
usesIndexTable()
Determines whether this handler implements indexes by creating an index table. |
| Methods inherited from interface org.apache.hadoop.conf.Configurable |
|---|
getConf, setConf |
| Method Detail |
|---|
boolean usesIndexTable()
void analyzeIndexDefinition(Table baseTable,
Index index,
Table indexTable)
throws HiveException
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 definition
List<Task<?>> generateIndexBuildTaskList(Table baseTbl,
Index index,
List<Partition> indexTblPartitions,
List<Partition> baseTblPartitions,
Table indexTbl,
Set<ReadEntity> inputs,
Set<WriteEntity> outputs)
throws HiveException
baseTbl - the definition of the table being indexedindex - the definition of the indexbaseTblPartitions - list of base table partitions with each element mirrors to the
corresponding one in indexTblPartitionsindexTbl - the definition of the index table, or null if usesIndexTable()
returns nullinputs - inputs for hooks, supplemental outputs going
along with the return valueoutputs - outputs for hooks, supplemental outputs going
along with the return value
HiveException - if plan generation fails
void generateIndexQuery(List<Index> indexes,
ExprNodeDesc predicate,
ParseContext pctx,
HiveIndexQueryContext queryContext)
indexes - predicate - pctx - queryContext - contains results, such as query tasks and input configuration
boolean checkQuerySize(long inputSize,
HiveConf conf)
inputSize - size (in bytes) of the query in questionconf -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||