org.apache.hadoop.net
Class TableMapping
java.lang.Object
org.apache.hadoop.net.AbstractDNSToSwitchMapping
org.apache.hadoop.net.CachedDNSToSwitchMapping
org.apache.hadoop.net.TableMapping
- All Implemented Interfaces:
- Configurable, DNSToSwitchMapping
@InterfaceAudience.Public
@InterfaceStability.Evolving
public class TableMapping
- extends CachedDNSToSwitchMapping
Simple DNSToSwitchMapping
implementation that reads a 2 column text
file. The columns are separated by whitespace. The first column is a DNS or
IP address and the second column specifies the rack where the address maps.
This class uses the configuration parameter net.topology.table.file.name
to locate the mapping file.
Calls to CachedDNSToSwitchMapping.resolve(List)
will look up the address as defined in the
mapping file. If no entry corresponding to the address is found, the value
/default-rack
is returned.
TableMapping
public TableMapping()
getConf
public Configuration getConf()
- Description copied from interface:
Configurable
- Return the configuration used by this object.
- Specified by:
getConf
in interface Configurable
- Overrides:
getConf
in class AbstractDNSToSwitchMapping
setConf
public void setConf(Configuration conf)
- Description copied from interface:
Configurable
- Set the configuration to be used by this object.
- Specified by:
setConf
in interface Configurable
- Overrides:
setConf
in class AbstractDNSToSwitchMapping
reloadCachedMappings
public void reloadCachedMappings()
- Description copied from interface:
DNSToSwitchMapping
- Reload all of the cached mappings.
If there is a cache, this method will clear it, so that future accesses
will get a chance to see the new data.
- Specified by:
reloadCachedMappings
in interface DNSToSwitchMapping
- Overrides:
reloadCachedMappings
in class CachedDNSToSwitchMapping
Copyright © 2014 Apache Software Foundation. All Rights Reserved.