protected static class ScriptBasedMapping.RawScriptBasedMapping extends AbstractDNSToSwitchMapping
CachedDNSToSwitchMapping
Constructor and Description |
---|
ScriptBasedMapping.RawScriptBasedMapping()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSingleSwitch()
Declare that the mapper is single-switched if a script was not named
in the configuration.
|
void |
reloadCachedMappings()
Reload all of the cached mappings.
|
void |
reloadCachedMappings(List<String> names)
Reload cached mappings on specific nodes.
|
List<String> |
resolve(List<String> names)
Resolves a list of DNS-names/IP-addresses and returns back a list of
switch information (network paths).
|
protected String |
runResolveCommand(List<String> args,
String commandScriptName)
Build and execute the resolution command.
|
void |
setConf(Configuration conf)
Set the configuration and extract the configuration parameters of interest
|
String |
toString() |
dumpTopology, getConf, getSwitchMap, isMappingSingleSwitch, isSingleSwitchByScriptPolicy
public ScriptBasedMapping.RawScriptBasedMapping()
setConf(Configuration)
has been calledpublic void setConf(Configuration conf)
setConf
in interface Configurable
setConf
in class AbstractDNSToSwitchMapping
conf
- the new configurationpublic List<String> resolve(List<String> names)
DNSToSwitchMapping
NetworkTopology.DEFAULT_RACK
. This
is what the bundled implementations do, though it is not a formal requirementnames
- the list of hosts to resolve (can be empty)protected String runResolveCommand(List<String> args, String commandScriptName)
args
- a list of argumentspublic boolean isSingleSwitch()
isSingleSwitch
in class AbstractDNSToSwitchMapping
public void reloadCachedMappings()
DNSToSwitchMapping
public void reloadCachedMappings(List<String> names)
DNSToSwitchMapping
Copyright © 2017 Apache Software Foundation. All Rights Reserved.