@ThreadSafe public final class SpecificHostPolicy extends Object implements BlockLocationPolicy
PropertyKey.WORKER_HOSTNAME
(alluxio.worker.hostname).BlockLocationPolicy.Factory
Constructor and Description |
---|
SpecificHostPolicy(AlluxioConfiguration conf)
Constructs a new
SpecificHostPolicy
needed for instantiation in BlockLocationPolicy.Factory . |
SpecificHostPolicy(String hostname)
Constructs the policy with the hostname.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Optional<WorkerNetAddress> |
getWorker(GetWorkerOptions options)
Returns null if no active worker matches the hostname
provided in WORKER_HOSTNAME (alluxio.worker.hostname).
|
int |
hashCode() |
String |
toString() |
public SpecificHostPolicy(AlluxioConfiguration conf)
SpecificHostPolicy
needed for instantiation in BlockLocationPolicy.Factory
.conf
- Alluxio configurationpublic SpecificHostPolicy(String hostname)
hostname
- the name of the hostpublic Optional<WorkerNetAddress> getWorker(GetWorkerOptions options)
getWorker
in interface BlockLocationPolicy
options
- the options to get a block worker network address for a blockCopyright © 2023. All Rights Reserved.