Chia-Ping Tsai created HBASE-18742: -------------------------------------- Summary: Make cache configuration like global switch Key: HBASE-18742 URL: https://issues.apache.org/jira/browse/HBASE-18742 Project: HBase Issue Type: New Feature Reporter: Chia-Ping Tsai Assignee: Chia-Ping Tsai
I'm profiling phoenix query w/wo hbase cache. And than i noticed the following codes in CacheConfig. {code} this(CacheConfig.instantiateBlockCache(conf), conf.getBoolean(CACHE_DATA_ON_READ_KEY, DEFAULT_CACHE_DATA_ON_READ) && family.isBlockCacheEnabled(), family.isInMemory(), // For the following flags we enable them regardless of per-schema settings // if they are enabled in the global configuration. conf.getBoolean(CACHE_BLOCKS_ON_WRITE_KEY, DEFAULT_CACHE_DATA_ON_WRITE) || family.isCacheDataOnWrite(), conf.getBoolean(CACHE_INDEX_BLOCKS_ON_WRITE_KEY, DEFAULT_CACHE_INDEXES_ON_WRITE) || family.isCacheIndexesOnWrite(), conf.getBoolean(CACHE_BLOOM_BLOCKS_ON_WRITE_KEY, DEFAULT_CACHE_BLOOMS_ON_WRITE) || family.isCacheBloomsOnWrite(), conf.getBoolean(EVICT_BLOCKS_ON_CLOSE_KEY, DEFAULT_EVICT_ON_CLOSE) || family.isEvictBlocksOnClose(), conf.getBoolean(CACHE_DATA_BLOCKS_COMPRESSED_KEY, DEFAULT_CACHE_DATA_COMPRESSED), conf.getBoolean(PREFETCH_BLOCKS_ON_OPEN_KEY, DEFAULT_PREFETCH_ON_OPEN) || family.isPrefetchBlocksOnOpen(), conf.getBoolean(ColumnFamilyDescriptorBuilder.CACHE_DATA_IN_L1, ColumnFamilyDescriptorBuilder.DEFAULT_CACHE_DATA_IN_L1) || family.isCacheDataInL1(), conf.getBoolean(DROP_BEHIND_CACHE_COMPACTION_KEY, DROP_BEHIND_CACHE_COMPACTION_DEFAULT) ); {code} The global configuration for cache do NOT look like global switch. The codes should be like this. {code} config.get(xxx, family.isxxx) {code} The cf level config should honor the global config. -- This message was sent by Atlassian JIRA (v6.4.14#64029)