hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-11934) Support KeyValueCodec to encode non KeyValue cells.
Date Wed, 10 Sep 2014 21:18:35 GMT

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

Enis Soztutar commented on HBASE-11934:
---------------------------------------

KVCodec spiiling bytes in KV format makes sense I think. 
Patch looks good. Two minor questions: 
Maybe keep the arg as short, and force explicit cast. It seems safer: 
{code}
-  public static void writeShort(OutputStream out, short v) throws IOException {
+  public static void writeShort(OutputStream out, int v) throws IOException {
{code}

Also if KV serialization changes (like adding more stuff like tags, etc), we should make sure
that the serialization in the KVUtil has to change as well. Maybe add a short comment in KV.oswrite()
pointing to there. Otherwise +1 for 0.99+. It seems that RC is still blocked. We can get this
in 0.99.0.  

> Support KeyValueCodec to encode non KeyValue cells.
> ---------------------------------------------------
>
>                 Key: HBASE-11934
>                 URL: https://issues.apache.org/jira/browse/HBASE-11934
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Performance, regionserver, Scanners
>    Affects Versions: 0.99.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>            Priority: Critical
>             Fix For: 2.0.0, 0.99.1
>
>         Attachments: HBASE-11934.patch
>
>
> We have KeyValueCodec as the default RPC codec now. This can only encode KeyValue types
and need to convert any non KV cell to KeyValue format. This is a expensive op. 
> {code}
>   // This is crass and will not work when KV changes. Also if passed a non-kv Cell, it
will
>   // make expensive copy.
>   // Do not write tags over RPC
>   KeyValue.oswrite((KeyValue) KeyValueUtil.ensureKeyValue(cell), this.out, false);
> {code}
> Now we want Cell to be in entire read path and don't want any copy until we write the
cell to client. 
> The optimization done in the DBE of avoiding copying of value bytes was also not getting
real advantage bacause of this ensureKeyValue() call at the Codec.
> We can encode and write non KeyValue cells with KV serialization format and avoid the
recreate.



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

Mime
View raw message