[ 
https://issues.apache.org/jira/browse/HBASE-15338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168590#comment-15168590
 ] 

Jingcheng Du commented on HBASE-15338:
--------------------------------------

bq. If we make cache on read in CacheConfig configurable and set it to false, 
the index and meta blocks will not be cached.
If caching meta block is decided by cacheConf.shouldCacheDataOnRead(), and if 
caching data index block is decided by the passed parameter from scanner. 
Please correct me if I am wrong.
{code}
   public boolean shouldCacheDataOnRead() {
+    if (disableCacheDataBlock) {
+      return false;
+    }
     return isBlockCacheEnabled() && cacheDataOnRead;
   }
{code}
In the patch, if the disableCacheDataBlock is true, no metadata can be cached?
And cacheConf.shouldCacheBlockOnRead in the current implementation is used for 
caching data blocks, if the cacheblock is enabled the index blocks can be cachd 
as well even the cache on read is disabled.



> Add a option to disable the data block cache for testing the performance of 
> underlying file system
> --------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15338
>                 URL: https://issues.apache.org/jira/browse/HBASE-15338
>             Project: HBase
>          Issue Type: Improvement
>          Components: integration tests
>            Reporter: Liu Shaohui
>            Assignee: Liu Shaohui
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-15338-trunk-v1.diff, HBASE-15338-trunk-v2.diff
>
>
> When testing and comparing the performance of different file systems(HDFS, 
> Azure blob storage, AWS S3 and so on) for HBase, it's better to avoid the 
> affect of the HBase BlockCache and get the actually random read latency when 
> data block is read from underlying file system. (Usually, the index block and 
> meta block should be cached in memory in the testing).
> So we add a option in CacheConfig to disable the data block cache.
> Suggestions are welcomed~ Thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to