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



##########
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:
       Oh ya.. I came to this PR to check this aspect.  I dont think it will be 
good if we allow to create offheap or file based BucketCache as part of MR 
scans.




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