HBASE-23887 AdaptiveLRU cache (#2934)
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
parent
56937056ea
commit
79272e481b
|
@ -247,4 +247,9 @@
|
||||||
<Bug pattern="SC_START_IN_CTOR"/>
|
<Bug pattern="SC_START_IN_CTOR"/>
|
||||||
</Match>
|
</Match>
|
||||||
|
|
||||||
|
<Match>
|
||||||
|
<Class name="org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache"/>
|
||||||
|
<Bug pattern="SC_START_IN_CTOR"/>
|
||||||
|
</Match>
|
||||||
|
|
||||||
</FindBugsFilter>
|
</FindBugsFilter>
|
||||||
|
|
|
@ -145,6 +145,8 @@ public final class BlockCacheFactory {
|
||||||
return new LruBlockCache(cacheSize, blockSize, true, c);
|
return new LruBlockCache(cacheSize, blockSize, true, c);
|
||||||
} else if (policy.equalsIgnoreCase("TinyLFU")) {
|
} else if (policy.equalsIgnoreCase("TinyLFU")) {
|
||||||
return new TinyLfuBlockCache(cacheSize, blockSize, ForkJoinPool.commonPool(), c);
|
return new TinyLfuBlockCache(cacheSize, blockSize, ForkJoinPool.commonPool(), c);
|
||||||
|
} else if (policy.equalsIgnoreCase("AdaptiveLRU")) {
|
||||||
|
return new LruAdaptiveBlockCache(cacheSize, blockSize, true, c);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Unknown policy: " + policy);
|
throw new IllegalArgumentException("Unknown policy: " + policy);
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue