[
https://issues.apache.org/jira/browse/HBASE-8201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13703761#comment-13703761
]
Sergey Shelukhin commented on HBASE-8201:
-----------------------------------------
{code}
assert header == 0x30 || header == (byte) 0xCF;
Order ord = header == 0x30 ? Order.ASCENDING : Order.DESCENDING;
{code}
This kind of code makes order encapsulation leak. But I guess it's better than
a method call to order method with base value.
{code}
i ^= ((i >> Integer.SIZE - 1) | Integer.MIN_VALUE);
{code}
I am not getting something here... The sign bit seems to be shifted into the
rightmost bit, and then or-ed with the mask with leftmost bit set? So, for
negative number, the mask to xor with will look like 1000...0001? Am I missing
something?
> Implement serialization strategies
> ----------------------------------
>
> Key: HBASE-8201
> URL: https://issues.apache.org/jira/browse/HBASE-8201
> Project: HBase
> Issue Type: Sub-task
> Components: Client
> Reporter: Nick Dimiduk
> Assignee: Nick Dimiduk
> Fix For: 0.95.2
>
> Attachments:
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch,
> 0001-HBASE-8201-OrderedBytes-provides-order-preserving-se.patch
>
>
> Once the spec is agreed upon, it must be implemented.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira