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

binlijin commented on HBASE-16659:
----------------------------------

No, not all can be replaced now, for example :
{code}
Result.java
  protected int binarySearch(final Cell [] kvs,
                             final byte [] family,
                             final byte [] qualifier) {
    Cell searchTerm =
        KeyValueUtil.createFirstOnRow(CellUtil.cloneRow(kvs[0]),
            family, qualifier);
  }
{code}
This is can not be replaced.

> Use CellUtil.createFirstOnRow instead of KeyValueUtil.createFirstOnRow in 
> some places. 
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-16659
>                 URL: https://issues.apache.org/jira/browse/HBASE-16659
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: binlijin
>            Assignee: binlijin
>            Priority: Minor
>         Attachments: HBASE-16659-master.patch, HBASE-16659-master_v2.patch
>
>
> CellUtil.createFirstOnRow is more effective than 
> KeyValueUtil.createFirstOnRow, because there is no byte[] copy.
> Current in ReversedRegionScannerImpl#nextRow, to get the previous row to 
> seek, it use KeyValueUtil.createFirstOnRow which will have two copy, the 
> first copy is copy to a tmp byte[], the second copy is in KeyValue. We can 
> use CellUtil.createFirstOnRow which will have no copy.



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

Reply via email to