Class DatanodeAdminProperties

java.lang.Object
org.apache.hadoop.hdfs.protocol.DatanodeAdminProperties

public class DatanodeAdminProperties extends Object
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 Details

    • DatanodeAdminProperties

      public DatanodeAdminProperties()
  • Method Details

    • getHostName

      public String getHostName()
      Return the host name of the datanode.
      Returns:
      the host name of the datanode.
    • setHostName

      public void setHostName(String hostName)
      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

      public String getUpgradeDomain()
      Get the upgrade domain of the datanode.
      Returns:
      the upgrade domain of the datanode.
    • setUpgradeDomain

      public void setUpgradeDomain(String upgradeDomain)
      Set the upgrade domain of the datanode.
      Parameters:
      upgradeDomain - the upgrade domain of the datanode.
    • getAdminState

      public DatanodeInfo.AdminStates getAdminState()
      Get the admin state of the datanode.
      Returns:
      the admin state of the datanode.
    • setAdminState

      public void setAdminState(DatanodeInfo.AdminStates adminState)
      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.