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



##########
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));
+    // don't allow L2 bucket cache for non RS process to avoid unexpected disk 
usage.
+    conf.unset(HConstants.BUCKET_CACHE_IOENGINE_KEY);

Review comment:
       this line should block the use of file based BucketCache, but I didn't 
unset the key of `EXTERNAL_BLOCKCACHE_KEY`/`hbase.blockcache.external.class` 
which should be default to off. 
   
   so, your concern should not be an issue here.




-- 
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