hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Marc Spaggiari (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-9032) Result.getBytes() returns null if backed by KeyValue array
Date Sun, 28 Jul 2013 22:21:49 GMT

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

Jean-Marc Spaggiari commented on HBASE-9032:

Ok I see.

There can be 2 cases here.

1) r1.getBytes() can be null (before your patch).
2) r1.getBytes() can be different than expected.

If r1.getBytes() send null, Result() constructor will still work but the comparison will fail.
If r1.getBytes() works but send a differenlt result that expected, the comparison will faile
too. So you don't really have a differentiation between the 2 cases. Adding  Assert.assertNotNull(r1.getBytes())
will allow to differentiate that. In both cases, test will fail, but that will help to know
what failed in it.

So, forget what I said about " instead of Result r2 = new", it should have been " in addition
of Result.compareResults(r1, r2);" (just before).

Make sense? 

> Result.getBytes() returns null if backed by KeyValue array
> ----------------------------------------------------------
>                 Key: HBASE-9032
>                 URL: https://issues.apache.org/jira/browse/HBASE-9032
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.94.9
>            Reporter: Aditya Kishore
>            Assignee: Aditya Kishore
>             Fix For: 0.94.11
>         Attachments: HBASE-9032.patch, HBASE-9032.patch, HBASE-9032.patch
> This applies only to 0.94 (and earlier) branch.
> If the Result object was constructed using either of Result(KeyValue[]) or Result(List<KeyValue>),
calling Result.getBytes() returns null instead of the serialized ImmutableBytesWritable object.

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

View raw message