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

Nick Dimiduk commented on HBASE-11550:
--------------------------------------

Thanks for the patch [~gustavoanatoly].

If the list of bucket sizes is required to be of increasing capacity, I would 
prefer this be enforced by BucketAllocator in its constructor. That is, don't 
do validation, just sort the array before it's used. As far as I can tell, 
BucketAllocator is the only place where this configuration is consumed. The 
only reason BucketCache keeps around a local reference to this configuration 
value is to make the value available when hydrating a persisted cache. Looking 
at the code again, I think the local variable can be dropped entirely. Ie, pass 
it through as a parameter to BucketCache.retrieveFromFile.

> Bucket sizes passed through BUCKET_CACHE_BUCKETS_KEY should be validated
> ------------------------------------------------------------------------
>
>                 Key: HBASE-11550
>                 URL: https://issues.apache.org/jira/browse/HBASE-11550
>             Project: HBase
>          Issue Type: Task
>            Reporter: Ted Yu
>            Assignee: Gustavo Anatoly
>            Priority: Trivial
>         Attachments: HBASE-11550.patch
>
>
> User can pass bucket sizes through "hbase.bucketcache.bucket.sizes" config 
> entry.
> The sizes are supposed to be in increasing order. Validation should be added 
> in CacheConfig#getL2().



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

Reply via email to