hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hsieh (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-9359) Convert KeyValue to Cell in hbase-client module - Result/Put/Delete, ColumnInterpreter
Date Mon, 09 Sep 2013 18:07:54 GMT

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

Jonathan Hsieh commented on HBASE-9359:
---------------------------------------

Originally came from discussion on HBASE-9334 but is mostly relevant to the HBASE-9359 part
of the commit.

[~nkeywal]:
{quote}
I may miss something obvious, but I understand that the goal of this change is to require
a recompile but not modification of the client app ("Recompile of client apps likely needed
after this change.").
But with this change:
public KeyValue[] raw() { ===> public Cell[] raw() {
A client which was calling 'raw' must now be changed to use 'Cell', no?
Incidentally, it seems not possible to write a client that would work with 2 versions of HBase
(i.e. modifying the client, but beeing able to compile the modified client with a previous
version of HBase).
I'm having the issue because I port the ycsb benchmark. It depends on raw.
Lastly, audience parameter for 'cell' is private, but as it appears in a public interface
I think it should be public...
{quote}

Good catch on the InterfaceAudience for Cell -- that should be updated.  I'll file and commit
that.

The release notes here highlight the minor changes need to be done to applications -- change
KeyValue to Cell, change List<KeyValue> to List<Cell>.


[~sershe]:
{quote}
+1 on fixing to not break compat... this is not the first time recently something was broken
like that (getFamilyMap, then HBASE_CLASSPATH), can we use normal deprecation route to avoid
breaking things.
Jonathan Hsieh what do you think should be done? Would the above patch be easy to fix up?
{quote}

I think adding parts of the old api back is possible but it will incur some non-trivial performance
cost -- generally we'll need to use KeyValueUtil.ensureKeyValue in many places and will also
need to make copy conversions of List<KeyValue> to List<Cell> and KeyValue[] to
Cell[].  See some of the gymnastics in place for Coprocs and Filters.  

We've been updating apps/systems dependent on hbase (some flume connectors, hive) and it has
been annoying but straight forward.  There are several cases already where we have broken
compat where we are not going to be able to restore the old api (some were due to writable->protobuf
conversion such as HBASE-7215).

In this patch I've added some of the most popular convenience methods to Cell as deprecated
to minimize pain (#getRow, #getQualifier, #getFamily, #getValue).  I think adding some of
the other more popular ones is reasonable but adding everythign back is not.  (a perf degraded
#raw seems like a candidate now, as well as a rename of the interface to #rawCells()).   Did
ycsb encounter any other conversion pains?

Other suggestions?
                
> Convert KeyValue to Cell in hbase-client module - Result/Put/Delete, ColumnInterpreter
> --------------------------------------------------------------------------------------
>
>                 Key: HBASE-9359
>                 URL: https://issues.apache.org/jira/browse/HBASE-9359
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Client
>    Affects Versions: 0.95.2
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>             Fix For: 0.98.0, 0.96.0
>
>         Attachments: hbase-9334-9359.v4.patch, hbase-9359-9334.v5.patch, hbase-9359-9334.v6.patch,
hbase-9359.patch, hbase-9359.v2.patch, hbase-9359.v3.patch, hbase-9359.v5.patch, hbase-9359.v6.patch
>
>
> This path is the second half of eliminating KeyValue from the client interfaces.  This
percolated through quite a bit. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message