taklwu commented on a change in pull request #3684:
URL: https://github.com/apache/hbase/pull/3684#discussion_r709892000



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/client/ClientSideRegionScanner.java
##########
@@ -60,6 +62,14 @@ public ClientSideRegionScanner(Configuration conf, 
FileSystem fs,
     region = HRegion.newHRegion(CommonFSUtils.getTableDir(rootDir, 
htd.getTableName()), null, fs,
       conf, hri, htd, null);
     region.setRestoredRegion(true);
+    // non RS process does not have a block cache, and this a client side 
scanner,
+    // create one for MapReduce jobs to cache the INDEX block
+    conf.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY,
+      conf.getFloat(HConstants.HBASE_CLIENT_SCANNER_BLOCK_CACHE_SIZE_KEY,
+        HConstants.HBASE_CLIENT_SCANNER_BLOCK_CACHE_SIZE_DEFAULT));

Review comment:
       introduced a new key `hfile.block.cache.fixed.size` and set to it 
whenever it's provided. I thought about comparing which one is smaller, 
however, I chose to keep it simpler because it's already complicated enough in 
the user experience between `hfile.block.cache.fixed.size` and 
`hfile.block.cache.size`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to