hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8782) Thrift2 can not parse values when using framed transport
Date Mon, 24 Jun 2013 12:06:20 GMT

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

Lars George commented on HBASE-8782:
------------------------------------

Ah, yeah, that makes sense (somewhat). As your error shows, you get way too much info in the
array. But I am still confused as to why getBytes() does work, as it iterates over the internal
array too. Is it because Buffer.remaining() is returning the shorter, and therefore appropriate
size?

And forget about my idea of caching, thinking about it again, since you do not have any info
on the given ByteBuffer, caching is irrelevant. Bummer.

bq. I added the below function to HtableInterface, so that I can just pass the ByteBuffer
without using the .getBytes function . Do you think this solution is a good idea ?

I think you are saying that you added this to the ThriftHBaseServiceHandler.java, right? Not
HTableInterface. So that you can call getTable() with the ByteBuffer and do the conversion
in one place. You still need a few changes, i.e. in checkAndPut() etc. but it makes the change
a little cleaner. If that is what you are saying, then that makes sense.

Also, you are saying Thrift1 does the same on all ByteBuffer's? If that is the case, then
we can do the same here too - although while looking at it, I would hope we find a less costly
way to use the ByteBuffer data, i.e. with one copy less. 

                
> Thrift2 can not parse values when using framed transport
> --------------------------------------------------------
>
>                 Key: HBASE-8782
>                 URL: https://issues.apache.org/jira/browse/HBASE-8782
>             Project: HBase
>          Issue Type: Bug
>          Components: Thrift
>    Affects Versions: 0.95.1
>            Reporter: Hamed Madani
>         Attachments: HBASE_8782.patch
>
>
> ThriftHBaseServiceHandler.java use .array() on table names , and values (family , qualifier
in checkandDelete , etc) which resulted in incorrect values with framed transport. Replacing
.array() with getBytes() fixed this problem. I've attached the patch
> EDIT: updated the patch to cover checkAndPut(), checkAndDelete()

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