hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14882) Provide a Put API that adds the provided family, qualifier, value without coping
Date Mon, 18 Jul 2016 15:40:20 GMT

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

Anoop Sam John commented on HBASE-14882:
----------------------------------------

IMO #1 alone is enough. When one calls addImmutable() by passing some byte[]s, the idea it
gives to a user that these need not do any copy at all.  Internally KV object creation is
doing a copy as it expects all the parts to be past of ONE consecutive byte[].  Now we have
cellification everywhere and have diff impls of Cell as well.  So we can avoid to create KV
object and create a new Cell impl which keeps 3 refs to row, fam and qual.  It also needs
ts, type details also.  No need to add any extra APIs at all. I dont know what can be the
best name for this new Cell impl class. CellWithoutLocalCopy  - That name seems not correct.

> 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)

Mime
View raw message