Reputation: 757
I am working on million Rows and columns in hbase 0.92.1. Now, I want to know how to create secondary index using Co-processor. Give some examples program for this.
Kindly give the program which supports hbase 0.92.1.
Upvotes: 2
Views: 1605
Reputation: 12786
As far as I know, prior to 0.20, in Hbase API, you'd have HTableDescriptor which is writable still, so you can call HtabelDescriptor.addIndex() to create indices against the columns. Example can be found here.
Then indexing starts moving to IHbase see the Jira story here.
To answer your question, in 0.92.1, I don't think there is anything out of box yet, you will have to write the coprocessor yourself, But There is a jira story for coprocessor secondary index you might want to watch the progress:)
meanwhile you can try idxColumnDescriptor here, also looking at the test TestIdxColumnDescriptor.java might help.
Upvotes: 1