hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15087) Fix hbase-common findbugs complaints
Date Mon, 11 Jan 2016 08:19:40 GMT

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

Anoop Sam John commented on HBASE-15087:

     return ByteBufferUtils.compareTo(((ByteBufferedCell)left).getFamilyByteBuffer(),
179	          ((ByteBufferedCell)left).getFamilyPosition(), left.getFamilyLength(),
180	          right.getFamilyArray(), right.getFamilyOffset(), right.getFamilyLength());
here right is a BBCell and left is normal Cell.  So we should be calling getXXXByteBuffer()
method on right and getXXXArray() method on left and here it is just reverse. Not correct
for the performance reasons.

To avoid the negation, we should add method in BBUtil 
compareTo(byte[] buf1, int o1, int l1, ByteBuffer buf2, int o2, int l2)

We already have compareTo(ByteBuffer buf1, int o1, int l1, byte[] buf2, int o2, int l2)

> Fix hbase-common findbugs complaints
> ------------------------------------
>                 Key: HBASE-15087
>                 URL: https://issues.apache.org/jira/browse/HBASE-15087
>             Project: HBase
>          Issue Type: Sub-task
>          Components: build
>            Reporter: stack
>            Assignee: Stack
>         Attachments: 15087.patch, 15087v2.patch

This message was sent by Atlassian JIRA

View raw message