[ https://issues.apache.org/jira/browse/HBASE-883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643744#action_12643744 ]
stack commented on HBASE-883: ----------------------------- Clint: This won't work, right: {code} + } + if (regionInfo != null && regionInfo.getTableDesc().getRowKeyComparator() != null) { + return regionInfo.getTableDesc().getRowKeyComparator().compare(rowA, rowB); } {code} i.e. a table-specific comparator. Since the .META. and -ROOT- use different comparator, there is going to be a disagreement, someday. Remove it from above and from HTableDescriptor? Minor: The below should be wrapped in an if (LOG.isDebugEnable()) check: {code} + LOG.debug("Index [" + indexSpec.getIndexId() + "] adding new entry [" + + Bytes.toString(indexUpdate.getRow()) + "] for row [" + + Bytes.toString(row) + "]"); {code} Otherwise you're paying string creation and then just throwing it all way when running at INFO level. Minor: Can you not do putAll below? {code} + for(IndexSpecification index : indexes) { + this.indexes.put(index.getIndexId(), index); + } {code} Minor: Missing javadoc on this class {code} +public class ReverseByteArrayComparator implements WritableComparator<byte[]> { {code} Minor: All data members in IndexSpecification look like they should be final; IndexSpecification looks immutable. Minor: When in hbase-land, its better to use HbaseObjectWritable rather than ObjectWritable. You'll get a little performance boost. You'll likely have to add new codes for your new classes; see head of HbaseObjectWritable. On above, the minor's are not important. Just FYI. I do think that removing the comparator important because could propagate wrong impression -- that an table-specific comparator is a possibility (unless you know something I don't). Thanks Clint. > Secondary Indexes > ----------------- > > Key: HBASE-883 > URL: https://issues.apache.org/jira/browse/HBASE-883 > Project: Hadoop HBase > Issue Type: New Feature > Components: client, regionserver > Reporter: Clint Morgan > Assignee: Clint Morgan > Fix For: 0.19.0 > > Attachments: hbase-883.patch, hbase-883.patch, hbase-883.patch, > hbase-883.patch, hbase-883.patch, hbase-883.patch > > > I'm working on a secondary index impl. The basic idea is to maintain a > separate table per index. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.