There is some built-in support for secondary indexes.

Look at IndexedTable. It is in contrib for 0.20 and part of the main codebase for 0.19.

0.20 Javadoc:

http://jgray.la/javadoc/hbase-0.20.0/org/apache/hadoop/hbase/client/tableindexed/package-summary.html

0.19 Javadoc:

http://hadoop.apache.org/hbase/docs/r0.19.3/api/org/apache/hadoop/hbase/client/tableindexed/package-summary.html


There have been some performance issues in the past, but I've not used the built-in facilities for some time. I do know of some people using this in production. Internally, we implement some indexes in the same manner but manage it in the application. See my previous e-mail to the list to understand how it's implemented.

JG

Ryan Rawson wrote:
hey,

That isn't how hbase (or even rdbms) work.  Instead you can retrieve
rows based on their row key. Otherwise you will have to read the
entire table to find just that 1 row. Yes this is as inefficient as it
sounds.

If you frequently have this issue, you may need to build and maintain
secondary indexes. Unlike relational dbs, there is no built in support
for this, you have to write your app to handle this.

-yran



On Sun, Aug 16, 2009 at 11:51 PM, lei wang<hbasemaill...@gmail.com> wrote:
Hi, if a know a cell in a hbase for its column:<qualifer>:value,  i need to
know which row key it belongs to. I searched the HBase api several times,
but i can not find the right method to solve my problem. Thanks for one's
suggestion to me.


Reply via email to