hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiang Li (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-14882) Provide a Put API that adds the provided family, qualifier, value without copying
Date Mon, 19 Sep 2016 15:47:20 GMT

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

Xiang Li edited comment on HBASE-14882 at 9/19/16 3:46 PM:
-----------------------------------------------------------

[~anoop.hbase], thanks very much for the explanations!

I uploaded patch version 002 for master, to address the following changes/comments:

1. The new implementation is extracted out of Put and named as "IndividualBytesFieldCell"
and put in the same package as KeyValue.
    "Put" type is not hard-coded in IndividualBytesFieldCell, but it is inputable for the
constructor of IndividualBytesFieldCell. While in Put#addImmutable(), it is set as "Put" type.

2. More interfaces are implemented: HeapSize, Cloneable, SettableSequenceId, SettableTimestamp.
(1) For Cloneable, only a shadow copy is made for each backing byte arrays. Does it make sense
to you?
(2) Streamable is not implemented

3. Add UT for both IndividualBytesFieldCell and Put#addImmutable()

Would you please review it, thanks!



was (Author: water):
[~anoop.hbase], thanks very much for the explanations!

I uploaded patch version 002 for master, to address the following changes/comments:
1. The new implementation is extracted out of Put and named as "IndividualBytesFieldCell"
and put in the same package as KeyValue.
    "Put" type is not hard-coded in IndividualBytesFieldCell, but it is inputable for the
constructor of IndividualBytesFieldCell. While in Put#addImmutable(), it is set as "Put" type.

2. More interfaces are implemented: HeapSize, Cloneable, SettableSequenceId, SettableTimestamp.
(1) For Cloneable, only a shadow copy is made for each backing byte arrays. Does it make sense
to you?
(2) Streamable is not implemented

3. Add UT for both IndividualBytesFieldCell and Put#addImmutable()

Would you please review it, thanks!


> 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
>
>         Attachments: HBASE-14882.master.000.patch, HBASE-14882.master.001.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)

Mime
View raw message