@NotThreadSafe public class PartialLRUEvictor extends LRUEvictor
StorageDir
s until one StorageDir satisfies the request space,
but PartialLRU select one StorageDir with maximum free space first and evict old blocks in the
selected StorageDir by LRUEvictor.Factory, Evictor.Mode
mLRUCache
mAllocator, mMetadataView
Constructor and Description |
---|
PartialLRUEvictor(BlockMetadataEvictorView view,
Allocator allocator)
Creates a new instance of
PartialLRUEvictor . |
Modifier and Type | Method and Description |
---|---|
protected BlockStoreLocation |
updateBlockStoreLocation(long bytesToBeAvailable,
BlockStoreLocation location)
Updates the block store location if the evictor wants to free space in a specific location.
|
getBlockIterator, onAccessBlock, onBlockLost, onCommitBlock, onRemoveBlockByClient, onRemoveBlockByWorker, onRemoveBlockFromIterator
cascadingEvict, freeSpaceWithView, freeSpaceWithView
onAbortBlock, onMoveBlockByClient, onMoveBlockByWorker, onStorageLost
public PartialLRUEvictor(BlockMetadataEvictorView view, Allocator allocator)
PartialLRUEvictor
.view
- a view of block metadata informationallocator
- an allocation policyprotected BlockStoreLocation updateBlockStoreLocation(long bytesToBeAvailable, BlockStoreLocation location)
AbstractEvictor
PartialLRUEvictor
always evicts blocks from a dir with max free space.updateBlockStoreLocation
in class AbstractEvictor
bytesToBeAvailable
- bytes to be available after evictionlocation
- the original block store locationCopyright © 2023. All Rights Reserved.