[
https://issues.apache.org/jira/browse/HBASE-14882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418821#comment-15418821
]
Xiang Li commented on HBASE-14882:
----------------------------------
Hi [~anoop.hbase],
I uploaded patch 000 for master branch and the same logic has been tested on
HBase 1.1.1.
The following addImmutable() is modified, with an anonymous Cell used.
{code}
public Put addImmutable(byte [] family, byte [] qualifier, long ts, byte []
value)
{code}
Because addImmutable() which is mentioned in the description(as below)
internally calls the modified one, so its behavior is changed as well.
{code}
public Put addImmutable(byte [] family, byte [] qualifier, byte [] value)
{code}
I did not update addImmutable() which have tag as its input, as they are marked
as @InterfaceAudience.Private.
> Provide a Put API that adds the provided family, qualifier, value without
> copying
> ---------------------------------------------------------------------------------
>
> Key: HBASE-14882
> URL: https://issues.apache.org/jira/browse/HBASE-14882
> Project: HBase
> Issue Type: Improvement
> Affects Versions: 1.2.0
> Reporter: Jerry He
> Assignee: Xiang Li
> Fix For: 2.0.0, 1.2.2
>
> Attachments: HBASE-14882.master.000.patch
>
>
> 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 family, qualifier and value are still being
> copied locally to create kv.
> Hopefully we should provide an API that truly uses immutable family,
> qualifier and value.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)