现在的位置: 首页 > 综合 > 正文

Secondary indexes in HBase

2013年01月04日 ⁄ 综合 ⁄ 共 7725字 ⁄ 字号 评论关闭

Creating secondary indexes in HBase-0.19.3:

You
need to enable indexing in HBase before you can create a secondary
index on columns. Edit the file $HBASE_INSTALL_DIR/conf/hbase-site.xml
and add the following property to it.


Adding secondary index while creating table:



Adding index in an existing table:



Deleting existing index from a table.



Reading from secondary indexed columns:

To read from a secondary index, get a scanner for the index and scan through the data.



To get a scanner to a subset of the rows specify a column filter.



Example Code:

 

抱歉!评论已关闭.