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

Xiang Li commented on HBASE-14881:
----------------------------------

Thanks for the comments, [~anoop.hbase]!

In my humble opinion, when it takes the whole row, such as in Put(byte[]) and 
Put(byte[], long), I could use this.row=row to avoid the copying. But when it 
takes a part of the provided rowArray as row, that is, when rowOffset and 
rowLength are provided, I can not make this.row to point to the middle of 
rowArray. Does Java provide a function to implement that? Please correct me if 
I am wrong.

> Provide a Put API that uses the provided row without coping
> -----------------------------------------------------------
>
>                 Key: HBASE-14881
>                 URL: https://issues.apache.org/jira/browse/HBASE-14881
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jerry He
>            Assignee: Xiang Li
>         Attachments: HBASE-14881-master-v0.patch
>
>
> The current available Put API always makes a copy of the rowkey.
> Let's provide an API that accepts an immutable byte array as rowkey without 
> making a copy.
> There are cases where the caller of Put has created the immutable byte array 
> (e.g from a serializer) and will not change it for the Put duration. We can 
> avoid making a copy again.



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

Reply via email to