Skip to content

Commit

Permalink
HBASE-23887 AdaptiveLRU cache (#2934)
Browse files Browse the repository at this point in the history
Signed-off-by: Viraj Jasani <vjasani@apache.org>
  • Loading branch information
pustota2009 authored Feb 13, 2021
1 parent e88f54b commit b2f85e5
Show file tree
Hide file tree
Showing 4 changed files with 2,602 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dev-support/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,9 @@
<Bug pattern="SC_START_IN_CTOR"/>
</Match>

<Match>
<Class name="org.apache.hadoop.hbase.io.hfile.LruAdaptiveBlockCache"/>
<Bug pattern="SC_START_IN_CTOR"/>
</Match>

</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ private static FirstLevelBlockCache createFirstLevelCache(final Configuration c)
return new LruBlockCache(cacheSize, blockSize, true, c);
} else if (policy.equalsIgnoreCase("TinyLFU")) {
return new TinyLfuBlockCache(cacheSize, blockSize, ForkJoinPool.commonPool(), c);
} else if (policy.equalsIgnoreCase("AdaptiveLRU")) {
return new LruAdaptiveBlockCache(cacheSize, blockSize, true, c);
} else {
throw new IllegalArgumentException("Unknown policy: " + policy);
}
Expand Down
Loading

0 comments on commit b2f85e5

Please sign in to comment.