@PublicApi public interface FileWriteLocationPolicy
Interface for the location policy of which workers a file's blocks are written into. A location policy instance is used only once per file write.
The FileOutStream
calls getWorkerForNextBlock(java.lang.Iterable<alluxio.client.block.BlockWorkerInfo>, long)
to decide which worker to write
the next block per block write.
A policy must have an empty constructor to be used as default policy.
Modifier and Type | Method and Description |
---|---|
WorkerNetAddress |
getWorkerForNextBlock(Iterable<BlockWorkerInfo> workerInfoList,
long blockSizeBytes)
Gets the worker's host name for the next block to write to.
|
WorkerNetAddress getWorkerForNextBlock(Iterable<BlockWorkerInfo> workerInfoList, long blockSizeBytes)
workerInfoList
- the info of the active workersblockSizeBytes
- the size of the block in bytesCopyright © 2023. All Rights Reserved.