public final class AlternateRackDNSToSwitchMapping extends AbstractDNSToSwitchMapping
DNSToSwitchMapping
interface It alternates bewteen RACK1 and RACK2 for the hosts.DEFAULT_RACK
Constructor and Description |
---|
AlternateRackDNSToSwitchMapping() |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
resolve(List<String> names)
Resolves a list of DNS-names/IP-address and returns back a map of DNS-name->switch information ( network paths).
|
String |
toString() |
dumpTopology, getSwitchMap, isSingleSwitch
public Map<String,String> resolve(List<String> names)
DNSToSwitchMapping
If a name cannot be resolved to a rack, the implementation should return {DEFAULT_RACK}. This is what the bundled implementations do, though it is not a formal requirement.
names
- the list of hosts to resolve (can be empty)Copyright © 2023 The Apache Software Foundation. All rights reserved.