Package | Description |
---|---|
org.apache.hadoop.hbase.io.hfile.bucket |
Provides
BucketCache , an implementation of
BlockCache . |
Modifier and Type | Field and Description |
---|---|
(package private) ConcurrentHashMap<BlockCacheKey,BucketEntry> |
BucketCache.backingMap |
private static Comparator<Map.Entry<BlockCacheKey,BucketEntry>> |
CachedEntryQueue.COMPARATOR |
(package private) static Comparator<BucketEntry> |
BucketEntry.COMPARATOR |
private org.apache.hbase.thirdparty.com.google.common.collect.MinMaxPriorityQueue<Map.Entry<BlockCacheKey,BucketEntry>> |
CachedEntryQueue.queue |
Modifier and Type | Method and Description |
---|---|
BucketEntry |
BucketEntry.retain() |
BucketEntry |
BucketCache.RAMQueueEntry.writeToCache(IOEngine ioEngine,
BucketAllocator alloc,
LongAdder realCacheSize,
Function<BucketEntry,ByteBuffAllocator.Recycler> createRecycler,
ByteBuffer metaBuff) |
Modifier and Type | Method and Description |
---|---|
(package private) static ConcurrentHashMap<BlockCacheKey,BucketEntry> |
BucketProtoUtils.fromPB(Map<Integer,String> deserializers,
org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BackingMap backingMap,
Function<BucketEntry,ByteBuffAllocator.Recycler> createRecycler) |
Map.Entry<BlockCacheKey,BucketEntry> |
CachedEntryQueue.poll()
Returns The next element in this queue, or
null if the queue is empty. |
Map.Entry<BlockCacheKey,BucketEntry> |
CachedEntryQueue.pollLast()
Returns The last element in this queue, or
null if the queue is empty. |
Modifier and Type | Method and Description |
---|---|
(package private) void |
BucketCache.blockEvicted(BlockCacheKey cacheKey,
BucketEntry bucketEntry,
boolean decrementBlockNumber,
boolean evictedByEvictionProcess)
This method is invoked after the bucketEntry is removed from
BucketCache.backingMap |
private ByteBuffAllocator.Recycler |
BucketCache.createRecycler(BucketEntry bucketEntry)
Create the
ByteBuffAllocator.Recycler for refCnt ,which would be used as
RefCnt.recycler of HFileBlock.buf returned from BucketCache.getBlock(org.apache.hadoop.hbase.io.hfile.BlockCacheKey, boolean, boolean, boolean) . |
private boolean |
BucketCache.doEvictBlock(BlockCacheKey cacheKey,
BucketEntry bucketEntry,
boolean evictedByEvictionProcess)
|
(package private) boolean |
BucketCache.evictBucketEntryIfNoRpcReferenced(BlockCacheKey blockCacheKey,
BucketEntry bucketEntry)
|
(package private) void |
BucketCache.freeBucketEntry(BucketEntry bucketEntry)
Free the {
BucketEntry actually,which could only be invoked when the
refCnt becoming 0. |
protected void |
BucketCache.putIntoBackingMap(BlockCacheKey key,
BucketEntry bucketEntry)
Put the new bucket entry into backingMap.
|
abstract Cacheable |
FileMmapIOEngine.read(BucketEntry be) |
Cacheable |
SharedMemoryMmapIOEngine.read(BucketEntry be) |
Cacheable |
ExclusiveMemoryMmapIOEngine.read(BucketEntry be) |
Cacheable |
FileIOEngine.read(BucketEntry be)
Transfers data from file to the given byte buffer
|
Cacheable |
ByteBufferIOEngine.read(BucketEntry be) |
Cacheable |
IOEngine.read(BucketEntry be)
Transfers data from IOEngine to a Cacheable object.
|
private static org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BucketEntry |
BucketProtoUtils.toPB(BucketEntry entry) |
Modifier and Type | Method and Description |
---|---|
void |
CachedEntryQueue.add(Map.Entry<BlockCacheKey,BucketEntry> entry)
Attempt to add the specified entry to this queue.
|
void |
BucketCache.BucketEntryGroup.add(Map.Entry<BlockCacheKey,BucketEntry> block) |
(package private) static ConcurrentHashMap<BlockCacheKey,BucketEntry> |
BucketProtoUtils.fromPB(Map<Integer,String> deserializers,
org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BackingMap backingMap,
Function<BucketEntry,ByteBuffAllocator.Recycler> createRecycler) |
private static org.apache.hadoop.hbase.shaded.protobuf.generated.BucketCacheProtos.BackingMap |
BucketProtoUtils.toPB(Map<BlockCacheKey,BucketEntry> backingMap) |
BucketEntry |
BucketCache.RAMQueueEntry.writeToCache(IOEngine ioEngine,
BucketAllocator alloc,
LongAdder realCacheSize,
Function<BucketEntry,ByteBuffAllocator.Recycler> createRecycler,
ByteBuffer metaBuff) |
Constructor and Description |
---|
BucketAllocator(long availableSpace,
int[] bucketSizes,
Map<BlockCacheKey,BucketEntry> map,
LongAdder realCacheSize)
Rebuild the allocator's data structures from a persisted map.
|
BucketEntry(long offset,
int length,
long accessCounter,
boolean inMemory,
Function<BucketEntry,ByteBuffAllocator.Recycler> createRecycler,
ByteBuffAllocator allocator) |
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.