HBase
  1. HBase
  2. HBASE-2426

[Transactional Contrib] Introduce quick scanning row-based secondary indexes

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Release Note:
      Hide
      RowBasedIndexSpecification introduces secondary indices where base table rows with the same indexed column value have their row keys stored as column qualifiers on the same secondary index table row. The key for that row is the indexed column value from the base table.
      Show
      RowBasedIndexSpecification introduces secondary indices where base table rows with the same indexed column value have their row keys stored as column qualifiers on the same secondary index table row. The key for that row is the indexed column value from the base table.

      Description

      RowBasedIndexSpecification is a specialized IndexSpecification class for creating row-based secondary index tables. Base table rows with the same indexed column value have their row keys stored as column qualifiers on the same secondary index table row. The key for that row is the indexed column value from the base table. This allows to avoid expensive secondary index table scans and provides faster access for applications such as foreign key indexing or queries such as "find all table A rows whose familyA:columnB value is X". RowBasedIndexSpecification indices can be scanned using the API on RowBasedIndexedTable. The metadata for RowBasedIndexSpecification differ from IndexSpecification in that:

      • Only a single base table column can be indexed per RowBasedIndexSpecification. No additional columns are put in the index table.
        and
      • RowBasedIndexKeyGenerator, which constructs the index-row-key from the indexed column value in the original column, is always used.

      For a simple RowBasedIndexSpecification example, look at the TestRowBasedIndexedTable unit test in org.apache.hadoop.hbase.client.tableIndexed.

      To enable RowBasedIndexSpecification 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.RowBasedIndexedRegionServer

        Activity

        George P. Stathis created issue -
        George P. Stathis made changes -
        Field Original Value New Value
        Attachment hbase-2426-0.20-branch.patch [ 12441168 ]
        stack made changes -
        Fix Version/s 0.20.5 [ 12314800 ]
        Labels hbase contrib transactions indexing moved_from_0_20_5
        stack made changes -
        Fix Version/s 0.22.0 [ 12314223 ]
        Fix Version/s 0.21.0 [ 12313607 ]
        stack made changes -
        Component/s contrib [ 12312986 ]
        stack made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Gary Helmling made changes -
        Fix Version/s 0.92.0 [ 12314223 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            George P. Stathis
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development