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

Package org.apache.hadoop.hdfs.server.protocol

# Class DatanodeRegistration

java.lang.Object
org.apache.hadoop.hdfs.protocol.DatanodeID
org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration

All Implemented Interfaces:
  `Comparable<org.apache.hadoop.hdfs.protocol.DatanodeID>`, `NodeRegistration`

@Private @Evolving public class DatanodeRegistration extends org.apache.hadoop.hdfs.protocol.DatanodeID implements NodeRegistration
DatanodeRegistration class contains all information the name-node needs to identify and verify a data-node when it contacts the name-node. This information is sent by data-node with each communication request.

- ## Field Summary

  ### Fields inherited from class org.apache.hadoop.hdfs.protocol.DatanodeID

  `EMPTY_ARRAY, EMPTY_DATANODE_ID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DatanodeRegistration(String uuid, DatanodeRegistration dnr)`
  `DatanodeRegistration(org.apache.hadoop.hdfs.protocol.DatanodeID dn, StorageInfo info, ExportedBlockKeys keys, String softwareVersion)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object to)`
  `String`
  `getAddress()`
  Get address of the server node.
  `ExportedBlockKeys`
  `getExportedKeys()`
  `NamespaceInfo`
  `getNamespaceInfo()`
  `String`
  `getRegistrationID()`
  Get registration ID of the server node.
  `String`
  `getSoftwareVersion()`
  `StorageInfo`
  `getStorageInfo()`
  `int`
  `getVersion()`
  Get layout version of the server node.
  `int`
  `hashCode()`
  `void`
  `setExportedKeys(ExportedBlockKeys keys)`
  `void`
  `setNamespaceInfo(NamespaceInfo nsInfo)`
  `String`
  `toString()`

  ### Methods inherited from class org.apache.hadoop.hdfs.protocol.DatanodeID

  `compareTo, getDatanodeUuid, getDatanodeUuidBytes, getHostName, getHostNameBytes, getInfoAddr, getInfoPort, getInfoSecureAddr, getInfoSecurePort, getIpAddr, getIpAddrBytes, getIpcAddr, getIpcPort, getPeerHostName, getResolvedAddress, getXferAddr, getXferAddr, getXferAddrWithHostname, getXferPort, setIpAddr, setPeerHostName, updateRegInfo`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### DatanodeRegistration

    @VisibleForTesting public DatanodeRegistration(String uuid, DatanodeRegistration dnr)

  - ### DatanodeRegistration

    public DatanodeRegistration(org.apache.hadoop.hdfs.protocol.DatanodeID dn, StorageInfo info, ExportedBlockKeys keys, String softwareVersion)

- ## Method Details

  - ### getStorageInfo

    public StorageInfo getStorageInfo()

  - ### setExportedKeys

    public void setExportedKeys(ExportedBlockKeys keys)

  - ### getExportedKeys

    public ExportedBlockKeys getExportedKeys()

  - ### getSoftwareVersion

    public String getSoftwareVersion()

  - ### getVersion

    public int getVersion()
    Description copied from interface: `NodeRegistration`
    Get layout version of the server node.
    Specified by:
      `getVersion` in interface `NodeRegistration`

  - ### setNamespaceInfo

    public void setNamespaceInfo(NamespaceInfo nsInfo)

  - ### getNamespaceInfo

    public NamespaceInfo getNamespaceInfo()

  - ### getRegistrationID

    public String getRegistrationID()
    Description copied from interface: `NodeRegistration`
    Get registration ID of the server node.
    Specified by:
      `getRegistrationID` in interface `NodeRegistration`

  - ### getAddress

    public String getAddress()
    Description copied from interface: `NodeRegistration`
    Get address of the server node.
    Specified by:
      `getAddress` in interface `NodeRegistration`
    Returns:
      ipAddr:portNumber

  - ### toString

    public String toString()
    Specified by:
      `toString` in interface `NodeRegistration`
    Overrides:
      `toString` in class `org.apache.hadoop.hdfs.protocol.DatanodeID`

  - ### equals

    public boolean equals(Object to)
    Overrides:
      `equals` in class `org.apache.hadoop.hdfs.protocol.DatanodeID`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `org.apache.hadoop.hdfs.protocol.DatanodeID`