Search in sources :

Example 1 with LowLevelCacheImpl

use of org.apache.hadoop.hive.llap.cache.LowLevelCacheImpl in project hive by apache.

the class TestLlapOrcCacheLoader method setUp.

@Before
public void setUp() {
    conf = new Configuration();
    HiveConf.setIntVar(conf, HiveConf.ConfVars.LLAP_LRFU_BP_WRAPPER_SIZE, 1);
    LowLevelLrfuCachePolicy lrfu = new LowLevelLrfuCachePolicy(1, 39, conf);
    buddyAllocator = TestBuddyAllocatorForceEvict.create(2048, 2, 4096, false, true);
    metrics = LlapDaemonCacheMetrics.create("", "");
    metaCache = new MetadataCache(buddyAllocator, null, lrfu, false, metrics);
    tracePool = IoTrace.createTracePool(conf);
    cache = new LowLevelCacheImpl(metrics, lrfu, buddyAllocator, true);
    mockDataCache = new LlapIoMocks.MockDataCache(cache, buddyAllocator, lrfu);
    mockDiskRangeListFactory = new LlapIoMocks.MockDiskRangeListFactory();
}
Also used : LlapIoMocks(org.apache.hadoop.hive.llap.io.LlapIoMocks) Configuration(org.apache.hadoop.conf.Configuration) LowLevelCacheImpl(org.apache.hadoop.hive.llap.cache.LowLevelCacheImpl) LowLevelLrfuCachePolicy(org.apache.hadoop.hive.llap.cache.LowLevelLrfuCachePolicy) MetadataCache(org.apache.hadoop.hive.llap.io.metadata.MetadataCache) Before(org.junit.Before)

Example 2 with LowLevelCacheImpl

use of org.apache.hadoop.hive.llap.cache.LowLevelCacheImpl in project hive by apache.

the class TestLlapCacheMetadataSerializer method setUp.

@Before
public void setUp() {
    conf = new Configuration();
    HiveConf.setIntVar(conf, HiveConf.ConfVars.LLAP_LRFU_BP_WRAPPER_SIZE, 1);
    HiveConf.setFloatVar(conf, HiveConf.ConfVars.LLAP_LRFU_HOTBUFFERS_PERCENTAGE, 1.0f);
    BuddyAllocator buddyAllocator = TestBuddyAllocatorForceEvict.create(16384, 2, 32768, false, true);
    LlapDaemonCacheMetrics metrics = LlapDaemonCacheMetrics.create("", "");
    cachePolicy = new LowLevelLrfuCachePolicy(1, 5, conf);
    LowLevelCacheImpl cache = new LowLevelCacheImpl(metrics, cachePolicy, buddyAllocator, true);
    fileMetadataCache = new MetadataCache(buddyAllocator, null, cachePolicy, false, metrics);
    tracePool = IoTrace.createTracePool(conf);
    mockDataCache = new LlapIoMocks.MockDataCache(cache, buddyAllocator, cachePolicy);
    pathCache = new MemoryLimitedPathCache(conf);
    tracePool = IoTrace.createTracePool(conf);
    serializer = new LlapCacheMetadataSerializer(fileMetadataCache, mockDataCache, conf, pathCache, tracePool, cachePolicy);
}
Also used : LlapIoMocks(org.apache.hadoop.hive.llap.io.LlapIoMocks) LlapDaemonCacheMetrics(org.apache.hadoop.hive.llap.metrics.LlapDaemonCacheMetrics) Configuration(org.apache.hadoop.conf.Configuration) LowLevelCacheImpl(org.apache.hadoop.hive.llap.cache.LowLevelCacheImpl) LowLevelLrfuCachePolicy(org.apache.hadoop.hive.llap.cache.LowLevelLrfuCachePolicy) FileMetadataCache(org.apache.hadoop.hive.common.io.FileMetadataCache) MetadataCache(org.apache.hadoop.hive.llap.io.metadata.MetadataCache) BuddyAllocator(org.apache.hadoop.hive.llap.cache.BuddyAllocator) MemoryLimitedPathCache(org.apache.hadoop.hive.llap.cache.MemoryLimitedPathCache) Before(org.junit.Before)

Aggregations

Configuration (org.apache.hadoop.conf.Configuration)2 LowLevelCacheImpl (org.apache.hadoop.hive.llap.cache.LowLevelCacheImpl)2 LowLevelLrfuCachePolicy (org.apache.hadoop.hive.llap.cache.LowLevelLrfuCachePolicy)2 LlapIoMocks (org.apache.hadoop.hive.llap.io.LlapIoMocks)2 MetadataCache (org.apache.hadoop.hive.llap.io.metadata.MetadataCache)2 Before (org.junit.Before)2 FileMetadataCache (org.apache.hadoop.hive.common.io.FileMetadataCache)1 BuddyAllocator (org.apache.hadoop.hive.llap.cache.BuddyAllocator)1 MemoryLimitedPathCache (org.apache.hadoop.hive.llap.cache.MemoryLimitedPathCache)1 LlapDaemonCacheMetrics (org.apache.hadoop.hive.llap.metrics.LlapDaemonCacheMetrics)1