@PublicApi public interface Allocator
Modifier and Type | Interface and Description |
---|---|
static class |
Allocator.Factory
Factory for
Allocator . |
Modifier and Type | Method and Description |
---|---|
StorageDirView |
allocateBlockWithView(long sessionId,
long blockSize,
BlockStoreLocation location,
BlockMetadataView view,
boolean skipReview)
Allocates a block from the given block store location under a given view.
|
StorageDirView allocateBlockWithView(long sessionId, long blockSize, BlockStoreLocation location, BlockMetadataView view, boolean skipReview)
BlockStoreLocation.anyTier()
or
BlockStoreLocation.anyDirInTier(String)
.
TODO(jiacheng): Refactor Allocator interface to decouple Reviewer logic from Allocator.
The proposed allocation will be reviewed by a Reviewer
.
The reviewer will check certain aspects of the allocation and may reject the allocation if
it does not meet certain criteria.
The parameter skipReview specifies whether the review should be skipped.
The review should be skipped when we want the behavior of the allocator to be deterministic
and do not want it to be affected by the reviewer.
E.g. We just freed up some space in Alluxio and want the allocation to use the freed space.sessionId
- the id of session to apply for the block allocationblockSize
- the size of block in byteslocation
- the location in block storeview
- of the block metadataskipReview
- whether the review should be skippedStorageDirView
in which to create the temp block meta if success, null
otherwiseCopyright © 2023. All Rights Reserved.