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

Liu Shaohui commented on HBASE-15420:
-------------------------------------

[~anoop.hbase]
{quote}
 BTW do we have tests in CacheConfig which considers configs specified within 
an HCD also? If not will be good to add some 
{quote}
Yes. See the TestCacheConfig#269
```
...
    conf.setBoolean(CacheConfig.CACHE_DATA_ON_READ_KEY, true);                  
                     
    conf.setBoolean(CacheConfig.CACHE_BLOCKS_ON_WRITE_KEY, false); 

    HColumnDescriptor family = new 
HColumnDescriptor("testDisableCacheDataBlock");                   
    family.setBlockCacheEnabled(false);                                         
                     
                                                                                
                     
    cacheConfig = new CacheConfig(conf, family);                                
                     
    assertFalse(cacheConfig.shouldCacheBlockOnRead(BlockCategory.DATA));        
                     
    assertFalse(cacheConfig.shouldCacheCompressed(BlockCategory.DATA));         
                     
    assertFalse(cacheConfig.shouldCacheDataCompressed());                       
                     
    assertFalse(cacheConfig.shouldCacheDataOnWrite());                          
                     
    assertFalse(cacheConfig.shouldCacheDataOnRead());                           
                     
    assertTrue(cacheConfig.shouldCacheBlockOnRead(BlockCategory.INDEX));        
                     
    assertFalse(cacheConfig.shouldCacheBlockOnRead(BlockCategory.META));        
                     
    assertTrue(cacheConfig.shouldCacheBlockOnRead(BlockCategory.BLOOM));        
                     
    assertTrue(cacheConfig.shouldCacheBloomsOnWrite());                         
                     
    assertTrue(cacheConfig.shouldCacheIndexesOnWrite());
```

> TestCacheConfig failed after HBASE-15338
> ----------------------------------------
>
>                 Key: HBASE-15420
>                 URL: https://issues.apache.org/jira/browse/HBASE-15420
>             Project: HBase
>          Issue Type: Test
>          Components: test
>            Reporter: Liu Shaohui
>            Assignee: Liu Shaohui
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-15420-v1.diff
>
>
> TestCacheConfig failed after HBASE-15338.
> Fix it in this issue~



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to