@ThreadSafe public final class TieredIdentityUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
matches(TieredIdentity.LocalityTier tier,
TieredIdentity.LocalityTier otherTier,
boolean resolveIpAddress)
Locality comparison for wire type locality tiers, two locality tiers matches if both name and
values are equal, or for the "node" tier, if the node names resolve to the same IP address.
|
static Optional<TieredIdentity> |
nearest(TieredIdentity tieredIdentity,
List<TieredIdentity> identities,
AlluxioConfiguration conf) |
public static boolean matches(TieredIdentity.LocalityTier tier, TieredIdentity.LocalityTier otherTier, boolean resolveIpAddress)
tier
- a wire type locality tierotherTier
- a wire type locality tier to compare toresolveIpAddress
- whether or not to resolve hostnames to IP addresses for node localitypublic static Optional<TieredIdentity> nearest(TieredIdentity tieredIdentity, List<TieredIdentity> identities, AlluxioConfiguration conf)
tieredIdentity
- the tiered identityidentities
- the tiered identities to compare toconf
- Alluxio configurationCopyright © 2023. All Rights Reserved.