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

Lars Hofhansl commented on HBASE-7320:
--------------------------------------

bq.  I started to look at all the times we get the family array.

That's legit, I think. Getting the row, family, qualifier and value via their 
own xyzArray method is OK.
We can assume that the row, family, qualifier, and value are laid out in ram in 
at least a byte[] (or bytebuffer). What we cannot assume that there is any 
layout relationship between them.

What is not OK are at least KeyValue.
* getBuffer
* getOffset
* getLength
* getKeyOffset
* getKeyLength
* getKey/getKeyString

As we should not assume that row/family/qualifier are laid out together nor 
that the entire KV is laid out together.



> Replace calls to KeyValue.getBuffer with appropropriate calls to getRowArray, 
> getFamilyArray(), getQualifierArray, and getValueArray
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-7320
>                 URL: https://issues.apache.org/jira/browse/HBASE-7320
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: stack
>             Fix For: 0.98.0
>
>
> In many places this is simple task of just replacing the method name.
> There, however, quite a few places where we assume that:
> # the entire KV is backed by a single byte array
> # the KVs key portion is backed by a single byte array
> Some of those can easily be fixed, others will need their own jiras.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to