[ 
https://issues.apache.org/jira/browse/HBASE-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13906880#comment-13906880
 ] 

rajeshbabu commented on HBASE-9203:
-----------------------------------

If you have some data then you can use 
org.apache.hadoop.hbase.index.mapreduce.TableIndexer mapreduce job to create 
index for existing data.

Are you refering IndexedHTableDescriptor from 
https://github.com/Huawei-Hadoop/hindex/blob/master/secondaryindex/src/main/java/org/apache/hadoop/hbase/index/IndexedHTableDescriptor.java?
If yes, currently you need to create IndexHTableDescriptor and set columns and 
properties of htabledescritor to IndexTableDescriptor object and add new 
indices(its little ugly). We have in plan to support add and drop indices 
dynamically.

In current work we are setting indices details as meta data to 
HTableDescriptor(see HTableDescriptor.java#setValue(byte[], byte[])) so need 
not have special table descritor(IndexedTableDescriptor).
For ex:
{code}
    TableIndices tableIndices = new TableIndices();
    tableIndices.addIndex(iSpec);
    htd.setValue(Constants.INDEX_SPEC_KEY, tableIndices.toByteArray());
{code}



> Secondary index support through coprocessors
> --------------------------------------------
>
>                 Key: HBASE-9203
>                 URL: https://issues.apache.org/jira/browse/HBASE-9203
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: rajeshbabu
>            Assignee: rajeshbabu
>         Attachments: SecondaryIndex Design.pdf, SecondaryIndex 
> Design_Updated.pdf, SecondaryIndex Design_Updated_2.pdf
>
>
> We have been working on implementing secondary index in HBase and open 
> sourced  on hbase 0.94.8 version.
> The project is available on github.
> https://github.com/Huawei-Hadoop/hindex
> This Jira is to support secondary index on trunk(0.98).
> Following features will be supported.
> -          multiple indexes on table,
> -          multi column index,
> -          index based on part of a column value,
> -          equals and range condition scans using index, and
> -          bulk loading data to indexed table (Indexing done with bulk load)
> Most of the kernel changes needed for secondary index is available in trunk. 
> Very minimal changes needed for it.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to