hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Chen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14189) BlockCache options should consider CF Level BlockCacheEnabled setting
Date Wed, 19 Aug 2015 08:44:46 GMT

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

Heng Chen commented on HBASE-14189:
-----------------------------------

Thanks for your reply!
1. 
{quote}
So this indicates whether the cache on read in ON at CF level.
{quote}
No no..  
{{cfBlockCacheEnabled}} only means whether BC is enabled or not at CF Level, it refer to the
HCD schema option {{BLOCKCACHE}}.
If it is OFF,  all BC operations will be disabled no matter write or read. 

So there need some changes in patch, and {{shouldCacheBlockOnRead}} should be something like
below:
{code}
  public boolean shouldCacheBlockOnRead(BlockCategory category) {
    if (!isBlockCacheEnabled()) {
      return false;
    }
   // skip CF Level BC check
    if (category == BlockCategory.INDEX ||
            category == BlockCategory.BLOOM ||
            (prefetchOnOpen &&
                    (category != BlockCategory.META &&
                            category != BlockCategory.UNKNOWN))) {
      return true;
    }
    return shouldCacheDataOnRead();
  }
{code}

2. 
{quote}
When cache on read is OFF at CF level but cache on write is ON, what we will do?
{quote}
{{cacheDataOnRead}} means we will cache block after read it. and {{cacheDataOnWrite}} means
we will cache block after writer it.
So if {{cacheDataOnRead}} is OFF and {{cacheDataOnWrite}} is ON, we will not cache block after
read, but cache it after write,  and when we read the block, we should read it from cache.












> 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, HBASE-14189_v1.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)

Mime
View raw message