public final class JobUtils extends Object
Modifier and Type | Method and Description |
---|---|
static BlockWorkerInfo |
getWorkerWithMostBlocks(List<BlockWorkerInfo> workers,
List<FileBlockInfo> fileBlockInfos)
Returns whichever specified worker stores the most blocks from the block info list.
|
static void |
loadBlock(URIStatus status,
FileSystemContext context,
long blockId,
WorkerNetAddress address,
boolean directCache)
Loads a block into the local worker.
|
public static BlockWorkerInfo getWorkerWithMostBlocks(List<BlockWorkerInfo> workers, List<FileBlockInfo> fileBlockInfos)
workers
- a list of workers to considerfileBlockInfos
- a list of file block informationpublic static void loadBlock(URIStatus status, FileSystemContext context, long blockId, WorkerNetAddress address, boolean directCache) throws AlluxioException, IOException
status
- the uriStatuscontext
- filesystem contextblockId
- the id of the block to loadaddress
- specify a worker to load intodirectCache
- Use passive-cache or direct cache requestAlluxioException
IOException
Copyright © 2023. All Rights Reserved.