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

Matt Corgan commented on HBASE-9383:
------------------------------------

{quote}are prefixtree cells present in the memstore?{quote}no, the memstore is 
fully expanded KeyValues, plus the overhead of the CSLM that contains them.  
(encoding the memstores would be a big improvement, btw)

{quote}for prefixtree heapsize, it would make sense to count the pointers, and 
separately count the shared prefixpool.{quote}well, they are not really 
pointers, just encoded integers of various sizes that "point" to various 
offsets within a block's byte[].

If for now you're just trying to replace KeyValue references with Cell and get 
all the generics working, tests passing, etc, then you may be ok having Cell's 
heapSize returning as if it's a fully expanded KeyValue.  I don't think it 
would break anything.

Maybe make KeyValueUtil.heapSize(Cell cell) and calling it from within all Cell 
implementations.  Or, does it even need to be in the implementation, or can be 
just a util method?  Is it ever called polymorphically?

We'd just have to be careful of how Cell's heapSize is used.  For example, to 
calculate the heapSize of an encoded data block, you'd want to look at the 
length of the block's total byte[] rather than adding up all the Cell.heapSizes 
in the block.
                
> Have Cell interface extend HeapSize interface
> ---------------------------------------------
>
>                 Key: HBASE-9383
>                 URL: https://issues.apache.org/jira/browse/HBASE-9383
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 0.96.0
>            Reporter: Jonathan Hsieh
>
> From the review of HBASE-9359. 
> bq. Stack: Cell should implement HeapSize?  That sounds right.
> bq. Ram: +1 for Cell extending HeapSize.
> bq. Jon: I'll look into Cell extending HeapSize as a follow on.  It doesn't 
> interfere with the signature and if a older 0.96 client talks to a 0.96.1 rs 
> that has the change, it won't matter.

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

Reply via email to