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