Package org.apache.hadoop.hbase.io.hfile
Class IndexOnlyLruBlockCache
java.lang.Object
org.apache.hadoop.hbase.io.hfile.LruBlockCache
org.apache.hadoop.hbase.io.hfile.IndexOnlyLruBlockCache
- All Implemented Interfaces:
Iterable<CachedBlock>
,HeapSize
,BlockCache
,FirstLevelBlockCache
,ResizableBlockCache
An on heap block cache implementation extended LruBlockCache and only cache index block. This
block cache should be only used by
ClientSideRegionScanner
that normally considers to be used by client resides out of the region server, e.g. a container
of a map reduce job.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.io.hfile.LruBlockCache
LruBlockCache.EvictionThread, LruBlockCache.StatisticsThread
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.io.hfile.LruBlockCache
CACHE_FIXED_OVERHEAD, DEFAULT_ACCEPTABLE_FACTOR, DEFAULT_CONCURRENCY_LEVEL, DEFAULT_LOAD_FACTOR, LRU_HARD_CAPACITY_LIMIT_FACTOR_CONFIG_NAME
-
Constructor Summary
ConstructorDescriptionIndexOnlyLruBlockCache
(long maxSize, long blockSize, boolean evictionThread, org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache only index block with the specified name and bufferMethods inherited from class org.apache.hadoop.hbase.io.hfile.LruBlockCache
acceptableSize, cacheBlock, clearCache, containsBlock, evict, evictBlock, evictBlock, evictBlocksByHfileName, getBlock, getBlockCaches, getBlockCount, getBloomBlockCount, getCachedFileNamesForTest, getCurrentBloomSize, getCurrentDataSize, getCurrentIndexSize, getCurrentSize, getDataBlockCount, getEncodingCountsForTest, getEvictionThread, getFreeSize, getIndexBlockCount, getMapForTests, getMaxSize, getOverhead, getStats, heapSize, isEvictionInProgress, iterator, logStats, setMaxSize, setVictimCache, shutdown, size, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.io.hfile.BlockCache
blockFitsIntoTheCache, cacheBlock, getBlockSize, getFullyCachedFiles, isAlreadyCached, isMetaBlock, notifyFileBlockEvicted, notifyFileCachingCompleted, shouldCacheFile
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IndexOnlyLruBlockCache
public IndexOnlyLruBlockCache(long maxSize, long blockSize, boolean evictionThread, org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
cacheBlock
Cache only index block with the specified name and buffer- Specified by:
cacheBlock
in interfaceBlockCache
- Overrides:
cacheBlock
in classLruBlockCache
- Parameters:
cacheKey
- block's cache keybuf
- block bufferinMemory
- if block is in-memory
-