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

Anoop Sam John commented on HBASE-12345:
----------------------------------------

We use UnsafeAccess APIs to read long/int/short which handle the endian.
{code}
public static long toLong(byte[] bytes, int offset) {
    if (littleEndian) {
      return Long.reverseBytes(theUnsafe.getLong(bytes, offset + 
BYTE_ARRAY_BASE_OFFSET));
    } else {
      return theUnsafe.getLong(bytes, offset + BYTE_ARRAY_BASE_OFFSET);
    }
  }
{code}

> Unsafe based Comparator for BB 
> -------------------------------
>
>                 Key: HBASE-12345
>                 URL: https://issues.apache.org/jira/browse/HBASE-12345
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>         Attachments: HBASE-12345.patch, HBASE-12345_V2.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to