[
https://issues.apache.org/jira/browse/HBASE-11550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14074585#comment-14074585
]
Nick Dimiduk commented on HBASE-11550:
--------------------------------------
Patch is looking good, but I'm not convinced the ticket is valid.
>From the description
bq. The sizes are supposed to be in increasing order.
and yet
{noformat}
+ Collections.sort(this.bucketSizes, Collections.reverseOrder());
{noformat}
Reverse is opposite the description. Which is correct?
nit: Why switch to List everywhere?
Can you add a test exercising the lack of sort as a problem? Something that
fails on master but passes with your patch. I tried this naive change but
nothing fails. Skimming the code, I would expect the cache to be underutilized
-- if this is a problem at all.
{noformat}
diff --git
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
index c526834..38a9a43 100644
---
a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
+++
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java
@@ -57,8 +57,8 @@ public class TestBucketCache {
return Arrays.asList(new Object[][] {
{ 8192, null }, // TODO: why is 8k the default blocksize for these tests?
{ 16 * 1024, new int[] {
- 2 * 1024 + 1024, 4 * 1024 + 1024, 8 * 1024 + 1024, 16 * 1024 + 1024,
- 28 * 1024 + 1024, 32 * 1024 + 1024, 64 * 1024 + 1024, 96 * 1024 + 1024,
+ 64 * 1024 + 1024, 32 * 1024 + 1024, 8 * 1024 + 1024, 16 * 1024 + 1024,
+ 28 * 1024 + 1024, 4 * 1024 + 1024, 2 * 1024 + 1024, 96 * 1024 + 1024,
128 * 1024 + 1024 } }
});
}
{noformat}
> 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-v1.patch, 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)