public class LocalWorkerPolicy extends Object implements WorkerLocationPolicy
WorkerLocationPolicy.Factory
Constructor and Description |
---|
LocalWorkerPolicy(AlluxioConfiguration conf)
Constructs a new
LocalWorkerPolicy . |
Modifier and Type | Method and Description |
---|---|
List<BlockWorkerInfo> |
getPreferredWorkers(List<BlockWorkerInfo> blockWorkerInfos,
String fileId,
int count)
Finds a local worker from the available workers, matching by hostname.
|
public LocalWorkerPolicy(AlluxioConfiguration conf)
LocalWorkerPolicy
.conf
- the configuration used by the policypublic List<BlockWorkerInfo> getPreferredWorkers(List<BlockWorkerInfo> blockWorkerInfos, String fileId, int count) throws ResourceExhaustedException
getPreferredWorkers
in interface WorkerLocationPolicy
ResourceExhaustedException
- if unable to return exactly #{count} workersCopyright © 2023. All Rights Reserved.