Uses of Class
org.apache.hadoop.hbase.io.hfile.BlockCacheKey
Packages that use BlockCacheKey
Package
Description
Provides implementations of
HFile and HFile
BlockCache.Provides
BucketCache, an implementation of
BlockCache.-
Uses of BlockCacheKey in org.apache.hadoop.hbase.io.hfile
Fields in org.apache.hadoop.hbase.io.hfile declared as BlockCacheKeyModifier and TypeFieldDescriptionprivate final BlockCacheKeyLruCachedBlock.cacheKeyprivate final BlockCacheKeyTinyLfuBlockCache.CachedBlockView.keyFields in org.apache.hadoop.hbase.io.hfile with type parameters of type BlockCacheKeyModifier and TypeFieldDescription(package private) final com.github.benmanes.caffeine.cache.Cache<BlockCacheKey,Cacheable> TinyLfuBlockCache.cacheprivate final ConcurrentHashMap<BlockCacheKey,LruCachedBlock> LruAdaptiveBlockCache.mapDefined the cache map asConcurrentHashMaphere, because inLruAdaptiveBlockCache.getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, boolean, boolean, boolean), we need to guarantee the atomicity of map#computeIfPresent (key, func).private final ConcurrentHashMap<BlockCacheKey,LruCachedBlock> LruBlockCache.mapDefined the cache map asConcurrentHashMaphere, because inLruBlockCache.getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, boolean, boolean, boolean), we need to guarantee the atomicity of map#k (key, func).private final com.github.benmanes.caffeine.cache.Policy.Eviction<BlockCacheKey,Cacheable> TinyLfuBlockCache.policyMethods in org.apache.hadoop.hbase.io.hfile that return BlockCacheKeyMethods in org.apache.hadoop.hbase.io.hfile that return types with arguments of type BlockCacheKeyModifier and TypeMethodDescription(package private) Map<BlockCacheKey,LruCachedBlock> LruAdaptiveBlockCache.getMapForTests()(package private) Map<BlockCacheKey,LruCachedBlock> LruBlockCache.getMapForTests()Methods in org.apache.hadoop.hbase.io.hfile with parameters of type BlockCacheKeyModifier and TypeMethodDescriptionvoidBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf) Add block to cache (defaults to not in-memory).voidBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Add block to cache.default voidBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory, boolean waitWhenCache) Add block to cache.voidCombinedBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf) voidCombinedBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) voidCombinedBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory, boolean waitWhenCache) voidInclusiveCombinedBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) voidIndexOnlyLruBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache only index block with the specified name and buffervoidLruAdaptiveBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf) Cache the block with the specified name and buffer.voidLruAdaptiveBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache the block with the specified name and buffer.voidLruBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf) Cache the block with the specified name and buffer.voidLruBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache the block with the specified name and buffer.voidMemcachedBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf) voidMemcachedBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) voidTinyLfuBlockCache.cacheBlock(BlockCacheKey key, Cacheable value) voidTinyLfuBlockCache.cacheBlock(BlockCacheKey cacheKey, Cacheable value, boolean inMemory) booleanFirstLevelBlockCache.containsBlock(BlockCacheKey cacheKey) Whether the cache contains the block with specified cacheKeybooleanLruAdaptiveBlockCache.containsBlock(BlockCacheKey cacheKey) Whether the cache contains block with specified cacheKeybooleanLruBlockCache.containsBlock(BlockCacheKey cacheKey) Whether the cache contains block with specified cacheKeybooleanTinyLfuBlockCache.containsBlock(BlockCacheKey cacheKey) booleanBlockCache.evictBlock(BlockCacheKey cacheKey) Evict block from cache.booleanCombinedBlockCache.evictBlock(BlockCacheKey cacheKey) booleanInclusiveCombinedBlockCache.evictBlock(BlockCacheKey cacheKey) booleanLruAdaptiveBlockCache.evictBlock(BlockCacheKey cacheKey) booleanLruBlockCache.evictBlock(BlockCacheKey cacheKey) booleanMemcachedBlockCache.evictBlock(BlockCacheKey cacheKey) booleanTinyLfuBlockCache.evictBlock(BlockCacheKey cacheKey) BlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) Fetch block from cache.CombinedBlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) InclusiveCombinedBlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) LruAdaptiveBlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) Get the buffer of the block with the specified name.LruBlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) Get the buffer of the block with the specified name.MemcachedBlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) TinyLfuBlockCache.getBlock(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) BlockCache.getBlockSize(BlockCacheKey key) Returns an Optional containing the size of the block related to the passed key.CombinedBlockCache.getBlockSize(BlockCacheKey key) private CacheableCombinedBlockCache.getBlockWithType(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) private HFileBlockHFileReaderImpl.getCachedBlock(BlockCacheKey cacheKey, boolean cacheBlock, boolean useLock, boolean updateCacheMetrics, BlockType expectedBlockType, DataBlockEncoding expectedDataBlockEncoding) Retrieve block from cache.intCombinedBlockCache.getRpcRefCount(BlockCacheKey cacheKey) BlockCache.isAlreadyCached(BlockCacheKey key) Checks whether the block for the passed key is already cached.CombinedBlockCache.isAlreadyCached(BlockCacheKey key) voidTinyLfuBlockCache.EvictionListener.onRemoval(BlockCacheKey key, Cacheable value, com.github.benmanes.caffeine.cache.RemovalCause cause) private voidHFileReaderImpl.returnAndEvictBlock(BlockCache cache, BlockCacheKey cacheKey, Cacheable block) static booleanBlockCacheUtil.shouldReplaceExistingCacheBlock(BlockCache blockCache, BlockCacheKey cacheKey, Cacheable newBlock) Because of the region splitting, it's possible that the split key locate in the middle of a block.private voidCombinedBlockCache.updateBlockMetrics(Cacheable block, BlockCacheKey key, BlockCache cache, boolean caching) static intBlockCacheUtil.validateBlockAddition(Cacheable existing, Cacheable newBlock, BlockCacheKey cacheKey) Validate that the existing and newBlock are the same without including the nextBlockMetadata, if not, throw an exception.Constructors in org.apache.hadoop.hbase.io.hfile with parameters of type BlockCacheKeyModifierConstructorDescriptionCachedBlockView(BlockCacheKey key, Cacheable value, long now) LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime) LruCachedBlock(BlockCacheKey cacheKey, Cacheable buf, long accessTime, boolean inMemory) -
Uses of BlockCacheKey in org.apache.hadoop.hbase.io.hfile.bucket
Fields in org.apache.hadoop.hbase.io.hfile.bucket declared as BlockCacheKeyFields in org.apache.hadoop.hbase.io.hfile.bucket with type parameters of type BlockCacheKeyModifier and TypeFieldDescription(package private) Map<BlockCacheKey,BucketEntry> BucketCache.backingMap(package private) NavigableSet<BlockCacheKey>BucketCache.blocksByHFileprivate static final Comparator<Map.Entry<BlockCacheKey,BucketEntry>> CachedEntryQueue.COMPARATOR(package private) final ConcurrentHashMap<BlockCacheKey,BucketCache.RAMQueueEntry> BucketCache.RAMCache.delegateDefined the map asConcurrentHashMapexplicitly here, because inBucketCache.RAMCache.get(BlockCacheKey)andBucketCache.RAMCache.putIfAbsent(BlockCacheKey, BucketCache.RAMQueueEntry), we need to guarantee the atomicity of map#computeIfPresent(key, func) and map#putIfAbsent(key, func).private org.apache.hbase.thirdparty.com.google.common.collect.MinMaxPriorityQueue<Map.Entry<BlockCacheKey,BucketEntry>> CachedEntryQueue.queueMethods in org.apache.hadoop.hbase.io.hfile.bucket that return BlockCacheKeyMethods in org.apache.hadoop.hbase.io.hfile.bucket that return types with arguments of type BlockCacheKeyModifier and TypeMethodDescription(package private) static Pair<ConcurrentHashMap<BlockCacheKey,BucketEntry>, NavigableSet<BlockCacheKey>> BucketProtoUtils.fromPB(Map<Integer, String> deserializers, org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BackingMap backingMap, Function<BucketEntry, ByteBuffAllocator.Recycler> createRecycler) (package private) static Pair<ConcurrentHashMap<BlockCacheKey,BucketEntry>, NavigableSet<BlockCacheKey>> BucketProtoUtils.fromPB(Map<Integer, String> deserializers, org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BackingMap backingMap, Function<BucketEntry, ByteBuffAllocator.Recycler> createRecycler) private Set<BlockCacheKey>BucketCache.getAllCacheKeysForFile(String hfileName) BucketCache.getBackingMap()CachedEntryQueue.poll()Returns The next element in this queue, ornullif the queue is empty.CachedEntryQueue.pollLast()Returns The last element in this queue, ornullif the queue is empty.Methods in org.apache.hadoop.hbase.io.hfile.bucket with parameters of type BlockCacheKeyModifier and TypeMethodDescription(package private) voidBucketCache.blockEvicted(BlockCacheKey cacheKey, BucketEntry bucketEntry, boolean decrementBlockNumber, boolean evictedByEvictionProcess) This method is invoked after the bucketEntry is removed fromBucketCache.backingMapvoidBucketCache.cacheBlock(BlockCacheKey cacheKey, Cacheable buf) Cache the block with the specified name and buffer.voidBucketCache.cacheBlock(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory) Cache the block with the specified name and buffer.voidBucketCache.cacheBlock(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory, boolean waitWhenCache) Cache the block with the specified name and buffer.voidBucketCache.cacheBlockWithWait(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory, boolean wait) Cache the block to ramCacheprotected voidBucketCache.cacheBlockWithWaitInternal(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory, boolean wait) booleanBucketCache.RAMCache.containsKey(BlockCacheKey key) private booleanBucketCache.doEvictBlock(BlockCacheKey cacheKey, BucketEntry bucketEntry, boolean evictedByEvictionProcess) booleanBucketCache.evictBlock(BlockCacheKey cacheKey) Try to evict the block fromBlockCacheby force.booleanBucketCache.evictBlockIfNoRpcReferenced(BlockCacheKey blockCacheKey) NOTE: This method is only for test.(package private) booleanBucketCache.evictBucketEntryIfNoRpcReferenced(BlockCacheKey blockCacheKey, BucketEntry bucketEntry) BucketCache.RAMCache.get(BlockCacheKey key) BucketCache.getBlock(BlockCacheKey key, boolean caching, boolean repeat, boolean updateCacheMetrics) Get the buffer of the block with the specified key.BucketCache.getBlockSize(BlockCacheKey key) intBucketCache.getRpcRefCount(BlockCacheKey cacheKey) BucketCache.isAlreadyCached(BlockCacheKey key) BucketCache.RAMCache.putIfAbsent(BlockCacheKey key, BucketCache.RAMQueueEntry entry) Return the previous associated value, or null if absent.protected voidBucketCache.putIntoBackingMap(BlockCacheKey key, BucketEntry bucketEntry) Put the new bucket entry into backingMap.booleanBucketCache.RAMCache.remove(BlockCacheKey key) booleanBucketCache.RAMCache.remove(BlockCacheKey key, Consumer<BucketCache.RAMQueueEntry> action) Defined anConsumerhere, because once the removed entry release its reference count, then it's ByteBuffers may be recycled and accessing it outside this method will be thrown an exception.protected booleanBucketCache.removeFromRamCache(BlockCacheKey cacheKey) protected booleanBucketCache.shouldReplaceExistingCacheBlock(BlockCacheKey cacheKey, Cacheable newBlock) private static org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BlockCacheKeyBucketProtoUtils.toPB(BlockCacheKey key) Method parameters in org.apache.hadoop.hbase.io.hfile.bucket with type arguments of type BlockCacheKeyModifier and TypeMethodDescriptionvoidBucketCache.BucketEntryGroup.add(Map.Entry<BlockCacheKey, BucketEntry> block) voidCachedEntryQueue.add(Map.Entry<BlockCacheKey, BucketEntry> entry) Attempt to add the specified entry to this queue.private static org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BackingMapBucketProtoUtils.toPB(Map<BlockCacheKey, BucketEntry> backingMap) Constructors in org.apache.hadoop.hbase.io.hfile.bucket with parameters of type BlockCacheKeyModifierConstructorDescription(package private)RAMQueueEntry(BlockCacheKey bck, Cacheable data, long accessCounter, boolean inMemory, boolean isCachePersistent) Constructor parameters in org.apache.hadoop.hbase.io.hfile.bucket with type arguments of type BlockCacheKeyModifierConstructorDescription(package private)BucketAllocator(long availableSpace, int[] bucketSizes, Map<BlockCacheKey, BucketEntry> map, LongAdder realCacheSize) Rebuild the allocator's data structures from a persisted map.