[ https://issues.apache.org/jira/browse/HBASE-14189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14681136#comment-14681136 ]
Heng Chen commented on HBASE-14189: ----------------------------------- {quote} The current layered approach is the way it is because we get global controls with local overrides. For instance, when I have as much memory as I expect to have data, cacheonwrite makes sense as a global setting. Can you elaborate on the above? It's an opinion, not really much reasoning to convince the rest of us. {quote} Thanks for your reply! The discuss detail is https://issues.apache.org/jira/browse/HBASE-14178 1. Now, {{family.isBlockCacheEnabled()}} is represented by {{CacheConfig.cacheDataOnRead}}, It is confused. So i use another {{CacheConfig.cfBlockCacheEnabled}} to stand for {{family.isBlockCacheEnabled()}}. And {{CacheConfig.cacheDataOnRead}} only means whether we should cache block when we read hfile block from hdfs. 2. As logic now, if {{CacheConfig.cacheDataOnWrite}} is true, we will cache the block after we write HFILE no matter {{family.isBlockCacheEnabled()}} is true or false. I think it is not correct, we should honour the CF Level Cache setting when we read or write BC. If the CF level cache setting told us not cache data after read or write HFILE, we should do it. So i think the RS level cache setting is useless, we should use CF Level cache setting to operate on BC. And if we want to have a global setting of CF Level cache setting, we should set default value in config file. > BlockCache options should consider CF Level BlockCacheEnabled setting > --------------------------------------------------------------------- > > Key: HBASE-14189 > URL: https://issues.apache.org/jira/browse/HBASE-14189 > Project: HBase > Issue Type: Improvement > Components: BlockCache > Affects Versions: 2.0.0 > Reporter: Heng Chen > Assignee: Heng Chen > Attachments: HBASE-14189.patch > > > While using BlockCache, we use {{cacheDataOnRead}}({{cacheDataOnWrite}}) > represents for whether we should cache block after read(write) block from(to) > hdfs. We should honour BC setting and CF Level cache setting while using > BlockCache. -- This message was sent by Atlassian JIRA (v6.3.4#6332)