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

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

Thanks for the comments [~anoop.hbase]!
Regarding your comments:
bq. Why no checkRow() when copyRow is false?
Added. Thanks!
bq. (For "copyRow") This looks like exposing the internal impl. Can we call 
this as ***Immutable? bufferIsImmutable?
I would like to name it as rowIsImmutable. "buffer" in "bufferIsImmutable" 
sounds to me like some internal "buffer" in the new constructors added is 
immutable, actually, we are requesting that the input row is immutable. Do it 
make sense to you?
bq. We can avoid code duplication. The code can be moved to Put(byte [] 
rowArray, int rowOffset, int rowLength, long ts, boolean b) and Put(byte [] 
rowArray, int rowOffset, int rowLength, long ts) can all the new one with 
passing false.
I keep existing constructors unchanged and do not add the boolean into them. I 
think when the row is mutable, the user can call(or I am expecting them to 
call) the existing constructors as before. The 2 new constructors actually are 
only used with rowIsImmutable = true. I do not expect the user to use the 2 new 
constructors with rowIsImmutable = false. Does it make any sense to you?

> 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
>    Affects Versions: 1.2.0
>            Reporter: Jerry He
>            Assignee: Xiang Li
>             Fix For: 2.0.0
>
>         Attachments: HBASE-14881-master-v0.patch, HBASE-14881.master.001.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