DatanodeAdminProperties (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.protocol, class: DatanodeAdminProperties

Package org.apache.hadoop.hdfs.protocol

# 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 Summary

  Constructors
  Constructor
  Description
  `DatanodeAdminProperties()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DatanodeInfo.AdminStates`
  `getAdminState()`
  Get the admin state of the datanode.
  `String`
  `getHostName()`
  Return the host name of the datanode.
  `long`
  `getMaintenanceExpireTimeInMS()`
  Get the maintenance expiration time in milliseconds.
  `int`
  `getPort()`
  Get the port number of the datanode.
  `String`
  `getUpgradeDomain()`
  Get the upgrade domain of the datanode.
  `void`
  `setAdminState(DatanodeInfo.AdminStates adminState)`
  Set the admin state of the datanode.
  `void`
  `setHostName(String hostName)`
  Set the host name of the datanode.
  `void`
  `setMaintenanceExpireTimeInMS(long maintenanceExpireTimeInMS)`
  Get the maintenance expiration time in milliseconds.
  `void`
  `setPort(int port)`
  Set the port number of the datanode.
  `void`
  `setUpgradeDomain(String upgradeDomain)`
  Set the upgrade domain of the datanode.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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.