org.apache.hadoop.conf.Configurablepublic class CombinedHostFileManager extends HostConfigManager
CombinedHostsFileReader for the json format.
Entries may or may not specify a port. If they don't, we consider them to apply to every DataNode on that host. The code canonicalizes the entries into IP addresses.
The code ignores all entries that the DNS fails to resolve their IP addresses. This is okay because by default the NN rejects the registrations of DNs when it fails to do a forward and reverse lookup. Note that DNS resolutions are only done during the loading time to minimize the latency.
| Constructor | Description |
|---|---|
CombinedHostFileManager() |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.hadoop.conf.Configuration |
getConf() |
|
java.lang.Iterable<java.net.InetSocketAddress> |
getExcludes() |
Return all datanodes that should be in decommissioned state.
|
java.lang.Iterable<java.net.InetSocketAddress> |
getIncludes() |
Return all the datanodes that are allowed to connect to the namenode.
|
long |
getMaintenanceExpirationTimeInMS(org.apache.hadoop.hdfs.protocol.DatanodeID dn) |
Get the maintenance expiration time in milli seconds.
|
java.lang.String |
getUpgradeDomain(org.apache.hadoop.hdfs.protocol.DatanodeID dn) |
Get the upgrade domain of a datanode.
|
boolean |
isExcluded(org.apache.hadoop.hdfs.protocol.DatanodeID dn) |
Check if a datanode needs to be decommissioned.
|
boolean |
isIncluded(org.apache.hadoop.hdfs.protocol.DatanodeID dn) |
Check if a datanode is allowed to connect the namenode.
|
void |
refresh() |
Reload the configuration.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
public java.lang.Iterable<java.net.InetSocketAddress> getIncludes()
HostConfigManagergetIncludes in class HostConfigManagerpublic java.lang.Iterable<java.net.InetSocketAddress> getExcludes()
HostConfigManagergetExcludes in class HostConfigManagerpublic void setConf(org.apache.hadoop.conf.Configuration conf)
public org.apache.hadoop.conf.Configuration getConf()
public void refresh()
throws java.io.IOException
HostConfigManagerrefresh in class HostConfigManagerjava.io.IOExceptionpublic boolean isIncluded(org.apache.hadoop.hdfs.protocol.DatanodeID dn)
HostConfigManagerisIncluded in class HostConfigManagerdn - the DatanodeID of the datanodepublic boolean isExcluded(org.apache.hadoop.hdfs.protocol.DatanodeID dn)
HostConfigManagerisExcluded in class HostConfigManagerdn - the DatanodeID of the datanodepublic java.lang.String getUpgradeDomain(org.apache.hadoop.hdfs.protocol.DatanodeID dn)
HostConfigManagergetUpgradeDomain in class HostConfigManagerdn - the DatanodeID of the datanodepublic long getMaintenanceExpirationTimeInMS(org.apache.hadoop.hdfs.protocol.DatanodeID dn)
HostConfigManagergetMaintenanceExpirationTimeInMS in class HostConfigManagerdn - the DatanodeID of the datanodeCopyright © 2008–2025 Apache Software Foundation. All rights reserved.