hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil gupta <anilgupt...@gmail.com>
Subject Best technique for doing lookup with Secondary Index
Date Wed, 24 Oct 2012 21:40:23 GMT
Hi All,

I am using HBase 0.92.1. I have created a secondary index on table "A".
Table A stores immutable data. I build the secondary table "B" using a
prePut RegionObserver.

The secondary index is stored in table "B" as rowkey B --> family:<rowkey
A>  . "<rowkey A>" is the column qualifier. Every row in B will only on
have one column and the name of that column is the rowkey of A. So the
value is blank. As per my understanding, accessing column qualifier is
faster than accessing value. Please correct me if i am wrong.

HBase Querying approach:
1. Scan the secondary table by using prefix filter and startRow.
2. Do a batch get on primary table by using HTable.get(List<Get>) method.

The above approach for retrieval works fine but i was wondering it there is
a better approach. I was planning to try out doing the retrieval using
Have anyone tried using coprocessors? I would appreciate if others can
share their experience with secondary index for HBase queries.

Thanks & Regards,
Anil Gupta

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message