[
https://issues.apache.org/jira/browse/HBASE-17028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833717#comment-16833717
]
Biju Nair commented on HBASE-17028:
-----------------------------------
Thanks for reviewing [~anoop.hbase]. Here is the code and the property value
mentioned in the doc patch is {{TinyLFU}}
{noformat}
private static FirstLevelBlockCache createFirstLevelCache(final Configuration
c) {
final long cacheSize = MemorySizeUtil.getOnHeapCacheSize(c);
if (cacheSize < 0) {
return null;
}
String policy = c.get(BLOCKCACHE_POLICY_KEY, BLOCKCACHE_POLICY_DEFAULT);
int blockSize = c.getInt(BLOCKCACHE_BLOCKSIZE_KEY,
HConstants.DEFAULT_BLOCKSIZE);
LOG.info("Allocating BlockCache size=" +
StringUtils.byteDesc(cacheSize) + ", blockSize=" +
StringUtils.byteDesc(blockSize));
if (policy.equalsIgnoreCase("LRU")) {
return new LruBlockCache(cacheSize, blockSize, true, c);
} else if (policy.equalsIgnoreCase("TinyLFU")) {
return new TinyLfuBlockCache(cacheSize, blockSize,
ForkJoinPool.commonPool(), c);
} else {
throw new IllegalArgumentException("Unknown policy: " + policy);
}
}{noformat}
> New 2.0 blockcache (tinylfu) doesn't have inmemory partition, etc Update doc
> and codebase accordingly
> -----------------------------------------------------------------------------------------------------
>
> Key: HBASE-17028
> URL: https://issues.apache.org/jira/browse/HBASE-17028
> Project: HBase
> Issue Type: Sub-task
> Components: BlockCache
> Reporter: stack
> Assignee: Biju Nair
> Priority: Major
> Attachments: HBASE-17028.patch
>
>
> Intent is to make the parent tinylfu blockcache default on in 2.0 replacing
> our old lru blockcache. This issue is about making it clear in doc and code
> how the new blockcache differs from the old (You can put back the old lru
> blockcache with config change).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)