HBASE-26274 Create an option to reintroduce BlockCache to mapreduce job (#3684)
authorTak Lon (Stephen) Wu <taklwu@apache.org>
Wed, 22 Sep 2021 16:17:18 +0000 (09:17 -0700)
committerGitHub <noreply@github.com>
Wed, 22 Sep 2021 16:17:18 +0000 (09:17 -0700)
commit6556a5ee91c1e8f4b03a4b992297a1d9954bfed7
tree6ea000c0c25aa42ea954b7848a28d5e8a52a900c
parent96fa015043e5ba6419bb8725899c2ac9dc9d89c5
HBASE-26274 Create an option to reintroduce BlockCache to mapreduce job (#3684)

Introduce `hfile.onheap.block.cache.fixed.size`
and default to disable. when using ClientSideRegionScanner
it will be enabled with a fixed size for caching
INDEX/LEAF_INDEX block when a client, e.g.
snapshot scanner, scans the entire HFile
and does not need to seek/reseek to index
block multiple times.
hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCache.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/BlockCacheFactory.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/IndexOnlyLruBlockCache.java [new file with mode: 0644]
hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientSideRegionScanner.java [new file with mode: 0644]
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCacheConfig.java