Class TestBucketCache.MockedBucketCache
java.lang.Object
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache
org.apache.hadoop.hbase.io.hfile.bucket.TestBucketCache.MockedBucketCache
- All Implemented Interfaces:
Iterable<org.apache.hadoop.hbase.io.hfile.CachedBlock>
,org.apache.hadoop.hbase.io.HeapSize
,org.apache.hadoop.hbase.io.hfile.BlockCache
- Enclosing class:
- TestBucketCache
private static class TestBucketCache.MockedBucketCache
extends org.apache.hadoop.hbase.io.hfile.bucket.BucketCache
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.io.hfile.bucket.BucketCache
org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.CacheState, org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMCache, org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.RAMQueueEntry, org.apache.hadoop.hbase.io.hfile.bucket.BucketCache.WriterThread
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.io.hfile.bucket.BucketCache
ACCEPT_FACTOR_CONFIG_NAME, BACKING_MAP_PERSISTENCE_CHUNK_SIZE, backingMap, BLOCK_ORPHAN_GRACE_PERIOD, BLOCK_ORPHAN_GRACE_PERIOD_DEFAULT, blocksByHFile, DEFAULT_BACKING_MAP_PERSISTENCE_CHUNK_SIZE, DEFAULT_ERROR_TOLERATION_DURATION, DEFAULT_MEMORY_FACTOR, DEFAULT_MIN_FACTOR, DEFAULT_MULTI_FACTOR, DEFAULT_SINGLE_FACTOR, DEFAULT_WRITER_QUEUE_ITEMS, DEFAULT_WRITER_THREADS, EXTRA_FREE_FACTOR_CONFIG_NAME, fullyCachedFiles, ioEngine, isCacheInconsistent, MEMORY_FACTOR_CONFIG_NAME, MIN_FACTOR_CONFIG_NAME, MULTI_FACTOR_CONFIG_NAME, offsetLock, QUEUE_ADDITION_WAIT_TIME, ramCache, regionCachedSize, SINGLE_FACTOR_CONFIG_NAME, writerQueues, writerThreads
-
Constructor Summary
ConstructorDescriptionMockedBucketCache
(String ioEngineName, long capacity, int blockSize, int[] bucketSizes, int writerThreads, int writerQLen, String persistencePath) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cacheBlock
(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf) void
cacheBlock
(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf, boolean inMemory) Methods inherited from class org.apache.hadoop.hbase.io.hfile.bucket.BucketCache
acceptableSize, blockEvicted, blockFitsIntoTheCache, cacheBlock, cacheBlockWithWait, cacheBlockWithWaitInternal, createRecycler, doDrain, evictBlock, evictBlockIfNoRpcReferenced, evictBlocksByHfileName, evictBlocksRangeByHfileName, evictBucketEntryIfNoRpcReferenced, fileCacheCompleted, finalize, freeBucketEntry, freeSpace, getAcceptableFactor, getAlgorithm, getAllocator, getBackingMap, getBackingMapValidated, getBlock, getBlockCaches, getBlockCount, getBlockForReference, getBlockSize, getBucketCacheFromCacheConfig, getCurrentDataSize, getCurrentSize, getDataBlockCount, getExtraFreeFactor, getFreeSize, getFullyCachedFiles, getIoEngine, getMaxSize, getMemoryFactor, getMinFactor, getMultiFactor, getPartitionSize, getPersistencePath, getRAMQueueEntries, getRealCacheSize, getRegionCachedInfo, getRpcRefCount, getSingleFactor, getStats, heapSize, isAlreadyCached, isCacheEnabled, isCacheInconsistent, isCacheInitialized, isCachePersistenceEnabled, isCachePersistent, iterator, logStats, notifyFileCachingCompleted, persistToFile, putIntoBackingMap, removeFromRamCache, setCacheInconsistent, setCacheState, shouldCacheFile, shouldReplaceExistingCacheBlock, shutdown, size, startBucketCachePersisterThread, startWriterThreads, stopWriterThreads, waitForCacheInitialization
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.io.hfile.BlockCache
getBlock, isMetaBlock
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MockedBucketCache
public MockedBucketCache(String ioEngineName, long capacity, int blockSize, int[] bucketSizes, int writerThreads, int writerQLen, String persistencePath) throws IOException - Throws:
IOException
-
-
Method Details
-
cacheBlock
public void cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf, boolean inMemory) - Specified by:
cacheBlock
in interfaceorg.apache.hadoop.hbase.io.hfile.BlockCache
- Overrides:
cacheBlock
in classorg.apache.hadoop.hbase.io.hfile.bucket.BucketCache
-
cacheBlock
public void cacheBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey cacheKey, org.apache.hadoop.hbase.io.hfile.Cacheable buf) - Specified by:
cacheBlock
in interfaceorg.apache.hadoop.hbase.io.hfile.BlockCache
- Overrides:
cacheBlock
in classorg.apache.hadoop.hbase.io.hfile.bucket.BucketCache
-