Package org.apache.hadoop.hdfs.protocol
Class DatanodeAdminProperties
java.lang.Object
org.apache.hadoop.hdfs.protocol.DatanodeAdminProperties
The class describes the configured admin properties for a datanode.
It is the static configuration specified by administrators via dfsadmin
command; different from the runtime state. CombinedHostFileManager uses
the class to deserialize the configurations from json-based file format.
To decommission a node, use AdminStates.DECOMMISSIONED.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the admin state of the datanode.Return the host name of the datanode.longGet the maintenance expiration time in milliseconds.intgetPort()Get the port number of the datanode.Get the upgrade domain of the datanode.voidsetAdminState(DatanodeInfo.AdminStates adminState) Set the admin state of the datanode.voidsetHostName(String hostName) Set the host name of the datanode.voidsetMaintenanceExpireTimeInMS(long maintenanceExpireTimeInMS) Get the maintenance expiration time in milliseconds.voidsetPort(int port) Set the port number of the datanode.voidsetUpgradeDomain(String upgradeDomain) Set the upgrade domain of the datanode.
-
Constructor Details
-
DatanodeAdminProperties
public DatanodeAdminProperties()
-
-
Method Details
-
getHostName
Return the host name of the datanode.- Returns:
- the host name of the datanode.
-
setHostName
Set the host name of the datanode.- Parameters:
hostName- the host name of the datanode.
-
getPort
public int getPort()Get the port number of the datanode.- Returns:
- the port number of the datanode.
-
setPort
public void setPort(int port) Set the port number of the datanode.- Parameters:
port- the port number of the datanode.
-
getUpgradeDomain
Get the upgrade domain of the datanode.- Returns:
- the upgrade domain of the datanode.
-
setUpgradeDomain
Set the upgrade domain of the datanode.- Parameters:
upgradeDomain- the upgrade domain of the datanode.
-
getAdminState
Get the admin state of the datanode.- Returns:
- the admin state of the datanode.
-
setAdminState
Set the admin state of the datanode.- Parameters:
adminState- the admin state of the datanode.
-
getMaintenanceExpireTimeInMS
public long getMaintenanceExpireTimeInMS()Get the maintenance expiration time in milliseconds.- Returns:
- the maintenance expiration time in milliseconds.
-
setMaintenanceExpireTimeInMS
public void setMaintenanceExpireTimeInMS(long maintenanceExpireTimeInMS) Get the maintenance expiration time in milliseconds.- Parameters:
maintenanceExpireTimeInMS- the maintenance expiration time in milliseconds.
-