@ThreadSafe public final class SpecificHostPolicy extends java.lang.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(java.lang.String hostname)
Constructs the policy with the hostname.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.Optional<WorkerNetAddress> |
getWorker(GetWorkerOptions options)
Returns null if no active worker matches the hostname
provided in WORKER_HOSTNAME (alluxio.worker.hostname).
|
int |
hashCode() |
java.lang.String |
toString() |
public SpecificHostPolicy(AlluxioConfiguration conf)
SpecificHostPolicy
needed for instantiation in BlockLocationPolicy.Factory.conf - Alluxio configurationpublic SpecificHostPolicy(java.lang.String hostname)
hostname - the name of the hostpublic java.util.Optional<WorkerNetAddress> getWorker(GetWorkerOptions options)
getWorker in interface BlockLocationPolicyoptions - the options to get a block worker network address for a blockpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2022. All Rights Reserved.