It is not mandatory to
derive DNSToSwitchMapping implementations from it, but it is strongly
recommended, as it makes it easy for the Hadoop developers to add new methods
to this base class that are automatically picked up by all implementations.

This class does not extend the Configured
base class, and should not be changed to do so, as it causes problems
for subclasses. The constructor of the Configured calls
the setConf(Configuration) method, which will call into the
subclasses before they have been fully constructed.

setConf

isSingleSwitch

public boolean isSingleSwitch()

Predicate that indicates that the switch mapping is known to be
single-switch. The base class returns false: it assumes all mappings are
multi-rack. Subclasses may override this with methods that are more aware
of their topologies.

This method is used when parts of Hadoop need know whether to apply
single rack vs multi-rack policies, such as during block placement.
Such algorithms behave differently if they are on multi-switch systems.