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

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

Now the options about cache configuration are below:
{code}
  /**
   * Whether blocks should be cached on read (default is on if there is a
   * cache but this can be turned off on a per-family or per-request basis).
   * If off we will STILL cache meta blocks; i.e. INDEX and BLOOM types.
   * This cannot be disabled.
   */
  private boolean cacheDataOnRead;

  /** Whether blocks should be flagged as in-memory when being cached */
  private final boolean inMemory;

  /** Whether data blocks should be cached when new files are written */
  private boolean cacheDataOnWrite;

  /** Whether index blocks should be cached when new files are written */
  private final boolean cacheIndexesOnWrite;

  /** Whether compound bloom filter blocks should be cached on write */
  private final boolean cacheBloomsOnWrite;

  /** Whether blocks of a file should be evicted when the file is closed */
  private boolean evictOnClose;

  /** Whether data blocks should be stored in compressed and/or encrypted form 
in the cache */
  private final boolean cacheDataCompressed;

  /** Whether data blocks should be prefetched into the cache */
  private final boolean prefetchOnOpen;

  /**
   * If true and if more than one tier in this cache deploy -- e.g. 
CombinedBlockCache has an L1
   * and an L2 tier -- then cache data blocks up in the L1 tier (The meta 
blocks are likely being
   * cached up in L1 already.  At least this is the case if CombinedBlockCache).
   */
  private boolean cacheDataInL1;
{code}

I think all the options are CF Level Cache Setting, and they are useless for 
the whole RS cache setting.

The whole RS cache only cares about whether the BC is enabled or not, and it 
has no business with how to use BC

So i think the options in config as like blow are useless, and i will remove 
them. At the same time, i will add one option
to decide whether open BC or not, for example, {{hbase.rs.blockcacheopen}}


{code}
  public static final String CACHE_BLOCKS_ON_READ_KEY =
          "hbase.rs.cacheblockonread";

  /**
   * Configuration key to cache data blocks on write. There are separate
   * switches for bloom blocks and non-root index blocks.
   */
  public static final String CACHE_BLOCKS_ON_WRITE_KEY =
      "hbase.rs.cacheblocksonwrite";

  /**
   * Configuration key to cache leaf and intermediate-level index blocks on
   * write.
   */
  public static final String CACHE_INDEX_BLOCKS_ON_WRITE_KEY =
      "hfile.block.index.cacheonwrite";

  /**
   * Configuration key to cache compound bloom filter blocks on write.
   */
  public static final String CACHE_BLOOM_BLOCKS_ON_WRITE_KEY =
      "hfile.block.bloom.cacheonwrite";

  /**
   * Configuration key to cache data blocks in compressed and/or encrypted 
format.
   */
  public static final String CACHE_DATA_BLOCKS_COMPRESSED_KEY =
      "hbase.block.data.cachecompressed";

  /**
   * Configuration key to evict all blocks of a given file from the block cache
   * when the file is closed.
   */
  public static final String EVICT_BLOCKS_ON_CLOSE_KEY =
      "hbase.rs.evictblocksonclose";

{code}

Am i right?





> 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
>            Reporter: Heng Chen
>            Assignee: Heng Chen
>
> 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)

Reply via email to