org.apache.hadoop.hive.ql.index
Class TableBasedIndexHandler

java.lang.Object
  extended by org.apache.hadoop.hive.ql.index.AbstractIndexHandler
      extended by org.apache.hadoop.hive.ql.index.TableBasedIndexHandler
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, HiveIndexHandler
Direct Known Subclasses:
BitmapIndexHandler, CompactIndexHandler

public abstract class TableBasedIndexHandler
extends AbstractIndexHandler

Index handler for indexes that use tables to store indexes.


Constructor Summary
TableBasedIndexHandler()
           
 
Method Summary
 List<Task<?>> generateIndexBuildTaskList(Table baseTbl, org.apache.hadoop.hive.metastore.api.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.
 org.apache.hadoop.conf.Configuration getConf()
           
 void setConf(org.apache.hadoop.conf.Configuration conf)
           
 boolean usesIndexTable()
          Determines whether this handler implements indexes by creating an index table.
 
Methods inherited from class org.apache.hadoop.hive.ql.index.AbstractIndexHandler
checkQuerySize, generateIndexQuery, getColumnNames
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hive.ql.index.HiveIndexHandler
analyzeIndexDefinition, generateIndexQuery
 

Constructor Detail

TableBasedIndexHandler

public TableBasedIndexHandler()
Method Detail

generateIndexBuildTaskList

public List<Task<?>> generateIndexBuildTaskList(Table baseTbl,
                                                org.apache.hadoop.hive.metastore.api.Index index,
                                                List<Partition> indexTblPartitions,
                                                List<Partition> baseTblPartitions,
                                                Table indexTbl,
                                                Set<ReadEntity> inputs,
                                                Set<WriteEntity> outputs)
                                         throws HiveException
Description copied from interface: HiveIndexHandler
Requests that the handler generate a plan for building the index; the plan should read the base table and write out the index representation.

Parameters:
baseTbl - the definition of the table being indexed
index - the definition of the index
baseTblPartitions - list of base table partitions with each element mirrors to the corresponding one in indexTblPartitions
indexTbl - the definition of the index table, or null if usesIndexTable() returns null
inputs - inputs for hooks, supplemental outputs going along with the return value
outputs - outputs for hooks, supplemental outputs going along with the return value
Returns:
list of tasks to be executed in parallel for building the index
Throws:
HiveException - if plan generation fails

usesIndexTable

public boolean usesIndexTable()
Description copied from interface: HiveIndexHandler
Determines whether this handler implements indexes by creating an index table.

Returns:
true if index creation implies creation of an index table in Hive; false if the index representation is not stored in a Hive table

getConf

public org.apache.hadoop.conf.Configuration getConf()

setConf

public void setConf(org.apache.hadoop.conf.Configuration conf)


Copyright © 2014 The Apache Software Foundation. All rights reserved.