Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/454#discussion_r94302315
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/cache/CacheProvider.java ---
    @@ -121,15 +141,24 @@ private void 
createDictionaryCacheForGivenType(CacheType cacheType, String carbo
        * @param cacheType
        */
       private void createLRULevelCacheInstance(CacheType cacheType) {
    -    CarbonLRUCache carbonLRUCache = null;
    -    // if cache type is dictionary cache, then same lru cache instance has 
to be shared
    -    // between forward and reverse cache
    -    if (cacheType.equals(CacheType.REVERSE_DICTIONARY) || cacheType
    -        .equals(CacheType.FORWARD_DICTIONARY)) {
    -      carbonLRUCache = new 
CarbonLRUCache(CarbonCommonConstants.CARBON_MAX_LEVEL_CACHE_SIZE,
    -          CarbonCommonConstants.CARBON_MAX_LEVEL_CACHE_SIZE_DEFAULT);
    -      cacheTypeToLRUCacheMap.put(CacheType.REVERSE_DICTIONARY, 
carbonLRUCache);
    -      cacheTypeToLRUCacheMap.put(CacheType.FORWARD_DICTIONARY, 
carbonLRUCache);
    +    boolean isDriver = Boolean.parseBoolean(CarbonProperties.getInstance()
    +        .getProperty(CarbonCommonConstants.IS_DRIVER_INSTANCE, "false"));
    +    if (isDriver) {
    +      carbonLRUCache = new 
CarbonLRUCache(CarbonCommonConstants.CARBON_MAX_DRIVER_LRU_CACHE_SIZE,
    +          CarbonCommonConstants.CARBON_MAX_LRU_CACHE_SIZE_DEFAULT);
    +    } else {
    +      // if executor cache size is not configured then driver cache conf 
will be used
    +      String executorCacheSize = CarbonProperties.getInstance()
    +          
.getProperty(CarbonCommonConstants.CARBON_MAX_EXECUTOR_LRU_CACHE_SIZE);
    +      if (null != executorCacheSize) {
    +        carbonLRUCache = new 
CarbonLRUCache(CarbonCommonConstants.CARBON_MAX_DRIVER_LRU_CACHE_SIZE,
    +            CarbonCommonConstants.CARBON_MAX_LRU_CACHE_SIZE_DEFAULT);
    --- End diff --
    
    correct the code....in case executor cache size use 
CARBON_MAX_EXECUTOR_LRU_CACHE_SIZE


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to