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

Nick Dimiduk commented on HBASE-11520:
--------------------------------------

v2 looks good to me. I'm still confused by CacheConfig though. There's two 
places where {{GLOBAL_BLOCK_CACHE_INSTANCE = new CombinedBlockCache(lruCache, 
bucketCache);}} This should not be the case. Can we rework the logic such that 
if {{conf.get(BUCKET_CACHE_IOENGINE_KEY, null) == null}} we just create the 
LruBlockCache instance and return?

Additional confusion comes from the updated test where you have 
{{conf.set(CacheConfig.BUCKET_CACHE_IOENGINE_KEY, "offheap")}} and 
{{conf.setBoolean(CacheConfig.BUCKET_CACHE_COMBINED_KEY, false)}}. That should 
be an invalid configuration, right? "I want two caches, but I want them to be 
independent of each other"? That does make sense. From my read, this should 
result in just an Lru instance, right? Isn't {{BUCKET_CACHE_COMBINED_KEY=true}} 
implied by specifying {{BUCKET_CACHE_IOENGINE_KEY}}?

Maybe this is all for yet another follow-on patch? Anyway, +1 for v2.

> Simplify offheap cache config by removing the confusing 
> "hbase.bucketcache.percentage.in.combinedcache"
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-11520
>                 URL: https://issues.apache.org/jira/browse/HBASE-11520
>             Project: HBase
>          Issue Type: Sub-task
>          Components: io
>    Affects Versions: 0.99.0
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.99.0, 2.0.0
>
>         Attachments: 11520.txt, 11520v2.txt
>
>
> Remove "hbase.bucketcache.percentage.in.combinedcache".  It is unnecessary 
> complication of block cache config.  Let L1 config setup be as it is whether 
> a L2 present or not, just set hfile.block.cache.size (not 
> hbase.bucketcache.size * (1.0 - 
> hbase.bucketcache.percentage.in.combinedcache)).  For L2, let 
> hbase.bucketcache.size be the actual size of the bucket cache, not 
> hbase.bucketcache.size * hbase.bucketcache.percentage.in.combinedcache.
> Attached patch removes the config. and updates docs.  Adds tests to confirm 
> configs are as expected whether a CombinedBlockCache deploy or a strict L1+L2 
> deploy.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to