Search in sources :

Example 1 with ReverseDictionaryCache

use of org.apache.carbondata.core.cache.dictionary.ReverseDictionaryCache in project carbondata by apache.

the class CacheProvider method createDictionaryCacheForGivenType.

/**
   * This method will create the cache for given cache type
   *
   * @param cacheType       type of cache
   * @param carbonStorePath store path
   */
private void createDictionaryCacheForGivenType(CacheType cacheType, String carbonStorePath) {
    Cache cacheObject = null;
    if (cacheType.equals(CacheType.REVERSE_DICTIONARY)) {
        cacheObject = new ReverseDictionaryCache<DictionaryColumnUniqueIdentifier, Dictionary>(carbonStorePath, carbonLRUCache);
    } else if (cacheType.equals(CacheType.FORWARD_DICTIONARY)) {
        cacheObject = new ForwardDictionaryCache<DictionaryColumnUniqueIdentifier, Dictionary>(carbonStorePath, carbonLRUCache);
    } else if (cacheType.equals(cacheType.EXECUTOR_BTREE)) {
        cacheObject = new BlockIndexStore<TableBlockUniqueIdentifier, AbstractIndex>(carbonStorePath, carbonLRUCache);
    } else if (cacheType.equals(cacheType.DRIVER_BTREE)) {
        cacheObject = new SegmentTaskIndexStore(carbonStorePath, carbonLRUCache);
    }
    cacheTypeToCacheMap.put(cacheType, cacheObject);
}
Also used : Dictionary(org.apache.carbondata.core.cache.dictionary.Dictionary) ForwardDictionaryCache(org.apache.carbondata.core.cache.dictionary.ForwardDictionaryCache) DictionaryColumnUniqueIdentifier(org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier) TableBlockUniqueIdentifier(org.apache.carbondata.core.datastore.block.TableBlockUniqueIdentifier) AbstractIndex(org.apache.carbondata.core.datastore.block.AbstractIndex) SegmentTaskIndexStore(org.apache.carbondata.core.datastore.SegmentTaskIndexStore) ReverseDictionaryCache(org.apache.carbondata.core.cache.dictionary.ReverseDictionaryCache) ForwardDictionaryCache(org.apache.carbondata.core.cache.dictionary.ForwardDictionaryCache)

Aggregations

Dictionary (org.apache.carbondata.core.cache.dictionary.Dictionary)1 DictionaryColumnUniqueIdentifier (org.apache.carbondata.core.cache.dictionary.DictionaryColumnUniqueIdentifier)1 ForwardDictionaryCache (org.apache.carbondata.core.cache.dictionary.ForwardDictionaryCache)1 ReverseDictionaryCache (org.apache.carbondata.core.cache.dictionary.ReverseDictionaryCache)1 SegmentTaskIndexStore (org.apache.carbondata.core.datastore.SegmentTaskIndexStore)1 AbstractIndex (org.apache.carbondata.core.datastore.block.AbstractIndex)1 TableBlockUniqueIdentifier (org.apache.carbondata.core.datastore.block.TableBlockUniqueIdentifier)1