Uses of Interface
org.apache.hadoop.hbase.io.hfile.Cacheable
Package
Description
Provides implementations of
HFile
and HFile
BlockCache
.Provides
BucketCache
, an implementation of
BlockCache
.-
Uses of Cacheable in org.apache.hadoop.hbase.io.hfile
Modifier and TypeInterfaceDescriptioninterface
CacheableDeserializer<T extends Cacheable>
Interface for a deserializer.Modifier and TypeClassDescriptionclass
TheByteBuffAllocator
won't allocate pooled heapByteBuff
now; at the same time, if allocate an off-heapByteBuff
from allocator, then it must be a pooled one.class
Cacheable Blocks of anHFile
version 2 file.class
TheByteBuffAllocator
won't allocate pooled heapByteBuff
now; at the same time, if allocate an off-heapByteBuff
from allocator, then it must be a pooled one.Modifier and TypeFieldDescriptionprivate final Cacheable
LruCachedBlock.buf
private final Cacheable
TinyLfuBlockCache.CachedBlockView.value
Modifier and TypeFieldDescriptionstatic final CacheableDeserializer<Cacheable>
HFileBlock.BLOCK_DESERIALIZER
Used deserializing blocks from Cache.(package private) final com.github.benmanes.caffeine.cache.Cache<BlockCacheKey,
Cacheable> TinyLfuBlockCache.cache
private final com.github.benmanes.caffeine.cache.Policy.Eviction<BlockCacheKey,
Cacheable> TinyLfuBlockCache.policy
private static final Map<Integer,
CacheableDeserializer<Cacheable>> CacheableDeserializerIdManager.registeredDeserializers
Modifier and TypeMethodDescriptionprivate Cacheable
LruAdaptiveBlockCache.asReferencedHeapBlock
(Cacheable buf) The block cached in LruAdaptiveBlockCache will always be an heap block: on the one side, the heap access will be more faster then off-heap, the small index block or meta block cached in CombinedBlockCache will benefit a lot.private Cacheable
LruBlockCache.asReferencedHeapBlock
(Cacheable buf) The block cached in LRUBlockCache will always be an heap block: on the one side, the heap access will be more faster then off-heap, the small index block or meta block cached in CombinedBlockCache will benefit a lot.private Cacheable
TinyLfuBlockCache.asReferencedHeapBlock
(Cacheable buf) The block cached in TinyLfuBlockCache will always be an heap block: on the one side, the heap access will be more faster then off-heap, the small index block or meta block cached in CombinedBlockCache will benefit a lot.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) private Cacheable
CombinedBlockCache.getBlockWithType
(BlockCacheKey cacheKey, boolean caching, boolean repeat, boolean updateCacheMetrics) LruCachedBlock.getBuffer()
default Cacheable
Cacheable.retain()
Increase its reference count, and only when no reference we can free the object's memory.Modifier and TypeMethodDescriptionCacheable.getDeserializer()
Returns CacheableDeserializer instance which reconstructs original object from ByteBuffer.static CacheableDeserializer<Cacheable>
CacheableDeserializerIdManager.getDeserializer
(int id) Get the cacheable deserializer registered at the given identifier Id.HFileBlock.getDeserializer()
Modifier and TypeMethodDescriptionprivate Cacheable
LruAdaptiveBlockCache.asReferencedHeapBlock
(Cacheable buf) The block cached in LruAdaptiveBlockCache will always be an heap block: on the one side, the heap access will be more faster then off-heap, the small index block or meta block cached in CombinedBlockCache will benefit a lot.private Cacheable
LruBlockCache.asReferencedHeapBlock
(Cacheable buf) The block cached in LRUBlockCache will always be an heap block: on the one side, the heap access will be more faster then off-heap, the small index block or meta block cached in CombinedBlockCache will benefit a lot.private Cacheable
TinyLfuBlockCache.asReferencedHeapBlock
(Cacheable buf) The block cached in TinyLfuBlockCache will always be an heap block: on the one side, the heap access will be more faster then off-heap, the small index block or meta block cached in CombinedBlockCache will benefit a lot.void
BlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf) Add block to cache (defaults to not in-memory).void
BlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Add block to cache.default void
BlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory, boolean waitWhenCache) Add block to cache.void
CombinedBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf) void
CombinedBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) void
CombinedBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory, boolean waitWhenCache) void
InclusiveCombinedBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) void
IndexOnlyLruBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache only index block with the specified name and buffervoid
LruAdaptiveBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf) Cache the block with the specified name and buffer.void
LruAdaptiveBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache the block with the specified name and buffer.void
LruBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf) Cache the block with the specified name and buffer.void
LruBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) Cache the block with the specified name and buffer.void
MemcachedBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf) void
MemcachedBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf, boolean inMemory) void
TinyLfuBlockCache.cacheBlock
(BlockCacheKey key, Cacheable value) void
TinyLfuBlockCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable value, boolean inMemory) private static int
BlockCacheUtil.compareCacheBlock
(Cacheable left, Cacheable right, boolean includeNextBlockMetadata) void
TinyLfuBlockCache.EvictionListener.onRemoval
(BlockCacheKey key, Cacheable value, com.github.benmanes.caffeine.cache.RemovalCause cause) private void
HFileReaderImpl.returnAndEvictBlock
(BlockCache cache, BlockCacheKey cacheKey, Cacheable block) static boolean
BlockCacheUtil.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 void
CombinedBlockCache.updateBlockMetrics
(Cacheable block, BlockCacheKey key, BlockCache cache, boolean caching) static int
BlockCacheUtil.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.Modifier and TypeMethodDescriptionstatic int
CacheableDeserializerIdManager.registerDeserializer
(CacheableDeserializer<Cacheable> cd) Register the givenCacheable
-- usually an hfileblock instance, these implement the Cacheable Interface -- deserializer and generate a unique identifier id for it and return this as our result.ModifierConstructorDescriptionCachedBlockView
(BlockCacheKey key, Cacheable value, long now) LruCachedBlock
(BlockCacheKey cacheKey, Cacheable buf, long accessTime) LruCachedBlock
(BlockCacheKey cacheKey, Cacheable buf, long accessTime, boolean inMemory) -
Uses of Cacheable in org.apache.hadoop.hbase.io.hfile.bucket
Modifier and TypeMethodDescriptionBucketCache.getBlock
(BlockCacheKey key, boolean caching, boolean repeat, boolean updateCacheMetrics) Get the buffer of the block with the specified key.BucketCache.RAMQueueEntry.getData()
ByteBufferIOEngine.read
(BucketEntry be) ExclusiveMemoryMmapIOEngine.read
(BucketEntry be) FileIOEngine.read
(BucketEntry be) Transfers data from file to the given byte bufferabstract Cacheable
FileMmapIOEngine.read
(BucketEntry be) IOEngine.read
(BucketEntry be) Transfers data from IOEngine to a Cacheable object.SharedMemoryMmapIOEngine.read
(BucketEntry be) (package private) Cacheable
BucketEntry.wrapAsCacheable
(ByteBuffer[] buffers) (package private) Cacheable
BucketEntry.wrapAsCacheable
(ByteBuff buf) Modifier and TypeMethodDescription(package private) CacheableDeserializer<Cacheable>
BucketEntry.deserializerReference()
Modifier and TypeMethodDescriptionvoid
BucketCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable buf) Cache the block with the specified name and buffer.void
BucketCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory) Cache the block with the specified name and buffer.void
BucketCache.cacheBlock
(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory, boolean waitWhenCache) Cache the block with the specified name and buffer.void
BucketCache.cacheBlockWithWait
(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory, boolean wait) Cache the block to ramCacheprotected void
BucketCache.cacheBlockWithWaitInternal
(BlockCacheKey cacheKey, Cacheable cachedItem, boolean inMemory, boolean wait) protected boolean
BucketCache.shouldReplaceExistingCacheBlock
(BlockCacheKey cacheKey, Cacheable newBlock) Modifier and TypeMethodDescription(package private) void
BucketEntry.setDeserializerReference
(CacheableDeserializer<Cacheable> deserializer) ModifierConstructorDescription(package private)
RAMQueueEntry
(BlockCacheKey bck, Cacheable data, long accessCounter, boolean inMemory, boolean isCachePersistent)