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

Anoop Sam John commented on HBASE-15338:
----------------------------------------

Ya after checking code that you mentioned we do 
cacheBlock && cacheConf.shouldCacheBlockOnRead(category)
So if Scan says cache block as false, we will not cache any thing.

But one way is there .  We won't set any thing wrt cache block in Scan/Get.  
When table is created make the CF with data block caching as false 
(setBlockCacheEnabled).
{code}
public boolean shouldCacheBlockOnRead(BlockCategory category) {
    return isBlockCacheEnabled()
        && (cacheDataOnRead ||
            category == BlockCategory.INDEX ||
            category == BlockCategory.BLOOM ||
            (prefetchOnOpen &&
                (category != BlockCategory.META &&
                 category != BlockCategory.UNKNOWN)));
  }
{code}
cacheDataOnRead contains value of HCD setting.
Can you test this..

Around this caching we have several settings already. Adding one more make 
thing more complex.. That is why I was checking whether we can avoid this 
addition and still achieve what u want.  Thanks for the correcting me..

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