[
https://issues.apache.org/jira/browse/HBASE-17877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15981451#comment-15981451
]
Sean Busbey commented on HBASE-17877:
-------------------------------------
{code}
722 /*
723 * We want to compare only the first index where left[index] !=
right[index]. This
724 * corresponds to the least significant nonzero byte in lw ^
rw, since lw and rw are
725 * little-endian. Long.numberOfTrailingZeros(diff) tells us the
least significant
726 * nonzero bit, and zeroing out the first three bits of L.nTZ
gives us the shift to get
727 * that least significant nonzero byte. This comparison logic
is based on UnsignedBytes
728 * from guava v22.0
729 */
{code}
I don't see a version 22 in the guava repo currently. Could we base this on the
v21 release? or reference a commit hash in their repo if there's a substantial
improvement?
> Replace/improve HBase's byte[] comparator
> -----------------------------------------
>
> Key: HBASE-17877
> URL: https://issues.apache.org/jira/browse/HBASE-17877
> Project: HBase
> Issue Type: Improvement
> Reporter: Lars Hofhansl
> Assignee: Vikas Vishwakarma
> Attachments: 17877-1.2.patch, 17877-v2-1.3.patch, 17877-v3-1.3.patch,
> 17877-v4-1.3.patch, ByteComparatorJiraHBASE-17877.pdf,
> HBASE-17877.branch-1.3.001.patch, HBASE-17877.branch-1.3.002.patch,
> HBASE-17877.master.001.patch, HBASE-17877.master.002.patch
>
>
> [~vik.karma] did some extensive tests and found that Hadoop's version is
> faster - dramatically faster in some cases.
> Patch forthcoming.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)