Huawei-Hadoop / hindex

Secondary Index for HBase
Apache License 2.0
591 stars 286 forks source link

how to use the index? #47

Closed xuxc closed 10 years ago

xuxc commented 10 years ago

and how to deploy the hindex into cluster,or just like hbase 0.90.4? and how to bulid the project?.. and can it works with hadoop 1.X?

chrajeshbabu commented 10 years ago

Yes you start deploy cluster like 0.90.4. Currently it's supported on top of HBase 0.94.8. To build hindex, you can run "mvn clean package -DskipTests" as how we build hbase. By default it works with hadoop 1.x.

xuxc commented 10 years ago

thx for u answer, that's to say: i need to build hbase0.94.8 firstly,and then build hindex? or just build hindex and deploy it?

chrajeshbabu commented 10 years ago

just build hindex and deploy it. Thanks

xuxc commented 9 years ago

hi, i'd like to know how index region's rowkey change when user region split, i found the pic in pdf namely SecondaryIndex Design.pdf: Note that index table's rowkeys are start with "001",but such region after split is start with "005", is something wrong in that PDF? if so, how to change index region's rowkey like "001_idxname_value_key" to "005_idxname_value_key"? ("005" means the index region's start key)

thank you!

anoopsjohn commented 9 years ago

After split HBase will kick start a compaction. As u know the split will create ref files and reading from those files use HalfStoreFileReader. The compaction will use these readers and do actual split of the file into 2. In case of index region split we will use Special halfStoreFileReader. This reader when output the Cells during compaction will do this rewrite of 001->005

xuxc commented 9 years ago

that's to say,when compacting Cells ,Special halfStoreFileReader will put a new rowkey ("005_idxname_value_key" ) instead of old one for a particular row?

anoopsjohn commented 9 years ago

Yes. The special reader will output cell with replaced rk. 001 part will be replaced to 005 (as that is the start key now)

xuxc commented 9 years ago

Hi , i'd like to know is it possible to change HRegion's split threshold dynamically? i.e I use some algorithm like genetic algorithm to modify split threshold without manual intervention, if so, what should I focus on? thanks , xuxc 12.16