You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Xiang Li (JIRA)" <ji...@apache.org> on 2016/07/18 15:15:21 UTC

[jira] [Commented] (HBASE-14882) Provide a Put API that adds the provided family, qualifier, value without coping

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

Xiang Li commented on HBASE-14882:
----------------------------------

[~jerryhe], [~anoop.hbase]
I think there are 3 items to implement for this JIRA:

(1) A new implementation of Cell that basically takes and keep all the input byte arrays. I plan to call it CellWithoutLocalCopy and put it into the package of org.apache.hadoop.hbase.client. The new implementation basically serves Put. But it would be good to have if it can be used by Delete, Increment and Get as well when we might try to implement the same enhancement(do not copy when addColumn()) for those 3 operations in the future.

(2) Add APIs into class Mutation called CreatePutCellWithoutLocalCopy() (maybe), to construct CellWithoutLocalCopy. Just like createPutKeyValue() to construct KeyValue.

(3) Modify existing AddImmutable() in class Put to call CreatePutCellWithoutLocalCopy.

I might need to open sub-tasks for (1) and (2) respectively.

That is my basic idea. Make any sense to you?

> Provide a Put API that adds the provided family, qualifier, value without coping
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-14882
>                 URL: https://issues.apache.org/jira/browse/HBASE-14882
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jerry He
>            Assignee: Xiang Li
>
> In the Put API, we have addImmutable()
> {code}
>  /**
>    * See {@link #addColumn(byte[], byte[], byte[])}. This version expects
>    * that the underlying arrays won't change. It's intended
>    * for usage internal HBase to and for advanced client applications.
>    */
>   public Put addImmutable(byte [] family, byte [] qualifier, byte [] value)
> {code}
> But in the implementation the row, family. qualifier and value are still being copied locally to create kv.
> Hopefully we should provide an API that truely uses immutable family, qualifier and value.



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