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 and Description
    `DatanodeAdminProperties()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### DatanodeAdminProperties

          public DatanodeAdminProperties()

  - ### Method Detail

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

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.