[
https://issues.apache.org/jira/browse/HBASE-14881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15375405#comment-15375405
]
Anoop Sam John commented on HBASE-14881:
----------------------------------------
Why only 2 versions of new constructor? Specially no corresponding one for
Put(byte[], int, int, long)
We can add it for Put(byte [] rowArray, int rowOffset, int rowLength) and
Put(byte [] rowArray, int rowOffset, int rowLength, long ts) with adding a new
boolean param. Any way for Put(byte[]) one can use Put(byte [] rowArray, int
rowOffset, int rowLength) with offset as 0 and length as rowArray.length
Why no checkRow() when copyRow is false?
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.
> 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)