hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12345) Unsafe based Comparator for BB
Date Tue, 28 Oct 2014 05:53:34 GMT

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

ramkrishna.s.vasudevan commented on HBASE-12345:
------------------------------------------------

Few comments
bq.return theUnsafe.getLong(buf.array(), BYTE_ARRAY_BASE_OFFSET + buf.arrayOffset() + offset);
Should this API include the buf.arrayOffset() or should the caller pass the offset that has
considered buf.arrayOffset?  Atleast in the HBASE read path code the offset is including hte
buf.arrayOffset.

For the DBB case of calculating the getXXX methods
bq.return theUnsafe.getLong(((DirectBuffer) buf).address() + offset);
There is a variation that takes a long getInt(long a), getLong(long a), getShort(long a).
 Do we need that impl also? The DBB impl is internally using unsafe APIs only. So not sure
whether we will endup in using such APIs.
Also the DBB code does an << 0 operation.  I feel that may not be needed as it is anyway
a no-op.  May be the DBB is code is a generated code and hence the compiler created a code
that does a << 0 which is a no-op. (not sure on that).

> 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
>
>




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

Mime
View raw message