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

Matt Corgan commented on HBASE-7320:
------------------------------------

{quote}I am just trying to make a patch where in every place possible we will 
refer as Cell rather than KV{quote}I think maybe changing *every* occurrence to 
Cell is going too far.  There are places where we know it is a KeyValue, like 
the memstore, so a method that gets a KeyValue from the memstore should have a 
return type of KeyValue.  This return type will be accepted by callers who want 
a Cell, but it's better because it contains more information.

Because of the above, you can rely on the KeyValue.heapSize() method from the 
memstore, but anywhere you get a Cell, you couldn't rely on heapSize.  If you 
are dealing with Cells, then heapSize should be calculated on a more granular 
basis (the size of the block of encoded bytes that contains the cells).  So I'm 
basically proposing that Cell should not implement heapSize().

I'm not sure if that helps with every situation Ram, just trying to illustrate 
some general thoughts.

> Remove KeyValue.getBuffer()
> ---------------------------
>
>                 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.99.0
>
>         Attachments: 7320-simple.txt
>
>
> 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