Package org.apache.accumulo.core.file.blockfile.cache

Examples of org.apache.accumulo.core.file.blockfile.cache.LruBlockCache.heapSize()


   
    Block[] singleBlocks = generateFixedBlocks(5, blockSize, "single");
    Block[] multiBlocks = generateFixedBlocks(5, blockSize, "multi");
    Block[] memoryBlocks = generateFixedBlocks(5, blockSize, "memory");
   
    long expectedCacheSize = cache.heapSize();
   
    // Add 3 blocks from each priority
    for (int i = 0; i < 3; i++) {
     
      // Just add single blocks
View Full Code Here


   
    // Do not expect any evictions yet
    assertEquals(0, cache.getEvictionCount());
   
    // Verify cache size
    assertEquals(expectedCacheSize, cache.heapSize());
   
    // Insert a single block, oldest single should be evicted
    cache.cacheBlock(singleBlocks[3].blockName, singleBlocks[3].buf);
   
    // Single eviction, one thing evicted
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.