Package org.apache.hadoop.hbase.client.tableindexed

This package provides support for secondary indexing by maintaining a separate, "index", table for each index.

See:
          Description

Interface Summary
IndexKeyGenerator  
 

Class Summary
IndexedTable HTable extended with indexed support.
IndexedTableAdmin Extension of HBaseAdmin that creates indexed tables.
IndexSpecification Holds the specification for a single secondary index.
ReverseByteArrayComparator  
SimpleIndexKeyGenerator Creates indexed keys for a single column....
 

Exception Summary
IndexNotFoundException Thrown when asking for an index that does not exist.
 

Package org.apache.hadoop.hbase.client.tableindexed Description

This package provides support for secondary indexing by maintaining a separate, "index", table for each index. The IndexSpecification class provides the metadata for the index. This includes:

  • the columns that contribute to the index key,
  • additional columns to put in the index table (and are thus made available to filters on the index table),
    and
  • an IndexKeyGenerator which constructs the index-row-key from the indexed column(s) and the original row. IndexesSpecifications can be added to a table's metadata (HTableDescriptor) before the table is constructed. Afterwards, updates and deletes to the original table will trigger the updates in the index, and the indexes can be scanned using the API on IndexedTable. For a simple example, look at the unit test in org.apache.hadoop.hbase.client.tableIndexed.

    To enable the indexing, modify hbase-site.xml to turn on the IndexedRegionServer. This is done by setting hbase.regionserver.class to org.apache.hadoop.hbase.ipc.IndexedRegionInterface and hbase.regionserver.impl to org.apache.hadoop.hbase.regionserver.tableindexed.IndexedRegionServer



    Copyright © 2008 The Apache Software Foundation