Search in sources :

Example 1 with BuddyAllocator

use of org.apache.hadoop.hive.llap.cache.BuddyAllocator 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)1 FileMetadataCache (org.apache.hadoop.hive.common.io.FileMetadataCache)1 BuddyAllocator (org.apache.hadoop.hive.llap.cache.BuddyAllocator)1 LowLevelCacheImpl (org.apache.hadoop.hive.llap.cache.LowLevelCacheImpl)1 LowLevelLrfuCachePolicy (org.apache.hadoop.hive.llap.cache.LowLevelLrfuCachePolicy)1 MemoryLimitedPathCache (org.apache.hadoop.hive.llap.cache.MemoryLimitedPathCache)1 LlapIoMocks (org.apache.hadoop.hive.llap.io.LlapIoMocks)1 MetadataCache (org.apache.hadoop.hive.llap.io.metadata.MetadataCache)1 LlapDaemonCacheMetrics (org.apache.hadoop.hive.llap.metrics.LlapDaemonCacheMetrics)1 Before (org.junit.Before)1