NodePlan (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.diskbalancer.planner, class: NodePlan

Package org.apache.hadoop.hdfs.server.diskbalancer.planner

# Class NodePlan

java.lang.Object
org.apache.hadoop.hdfs.server.diskbalancer.planner.NodePlan

public class NodePlan extends Object
NodePlan is a set of volumeSetPlans.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NodePlan()`
  Constructs an Empty Node Plan.
  `NodePlan(String datanodeName, int rpcPort)`
  Constructs an empty NodePlan.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getNodeName()`
  Returns the DataNode URI.
  `String`
  `getNodeUUID()`
  gets the Node UUID.
  `int`
  `getPort()`
  Gets the DataNode RPC Port.
  `long`
  `getTimeStamp()`
  returns timestamp when this plan was created.
  `List<Step>`
  `getVolumeSetPlans()`
  Returns a Map of VolumeSetIDs and volumeSetPlans.
  `static NodePlan`
  `parseJson(String json)`
  Parses a JSON string and converts to NodePlan.
  `void`
  `setNodeName(String nodeName)`
  Sets Node Name.
  `void`
  `setNodeUUID(String nodeUUID)`
  Sets the Node UUID.
  `void`
  `setPort(int port)`
  Sets the DataNode RPC Port.
  `void`
  `setTimeStamp(long timeStamp)`
  Sets the timestamp when this plan was created.
  `void`
  `setURI(String dataNodeName)`
  Sets the DataNodeURI.
  `void`
  `setVolumeSetPlans(List<Step> volumeSetPlans)`
  Sets a volume List plan.
  `String`
  `toJson()`
  Returns a JSON representation of NodePlan.

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

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

- ## Constructor Details

  - ### NodePlan

    public NodePlan()
    Constructs an Empty Node Plan.

  - ### NodePlan

    public NodePlan(String datanodeName, int rpcPort)
    Constructs an empty NodePlan.

- ## Method Details

  - ### getTimeStamp

    public long getTimeStamp()
    returns timestamp when this plan was created.
    Returns:
      long

  - ### setTimeStamp

    public void setTimeStamp(long timeStamp)
    Sets the timestamp when this plan was created.
    Parameters:
      `timeStamp` -

  - ### getVolumeSetPlans

    public List<Step> getVolumeSetPlans()
    Returns a Map of VolumeSetIDs and volumeSetPlans.
    Returns:
      List of Steps

  - ### setNodeName

    public void setNodeName(String nodeName)
    Sets Node Name.
    Parameters:
      `nodeName` - - Name

  - ### setVolumeSetPlans

    public void setVolumeSetPlans(List<Step> volumeSetPlans)
    Sets a volume List plan.
    Parameters:
      `volumeSetPlans` - - List of plans.

  - ### getNodeName

    public String getNodeName()
    Returns the DataNode URI.
    Returns:
      URI

  - ### setURI

    public void setURI(String dataNodeName)
    Sets the DataNodeURI.
    Parameters:
      `dataNodeName` - - String

  - ### getPort

    public int getPort()
    Gets the DataNode RPC Port.
    Returns:
      port

  - ### setPort

    public void setPort(int port)
    Sets the DataNode RPC Port.
    Parameters:
      `port` - - int

  - ### parseJson

    public static NodePlan parseJson(String json) throws IOException
    Parses a JSON string and converts to NodePlan.
    Parameters:
      `json` - - JSON String
    Returns:
      NodePlan
    Throws:
      `IOException`

  - ### toJson

    public String toJson() throws IOException
    Returns a JSON representation of NodePlan.
    Returns:
      - JSON String
    Throws:
      `IOException`

  - ### getNodeUUID

    public String getNodeUUID()
    gets the Node UUID.
    Returns:
      Node UUID.

  - ### setNodeUUID

    public void setNodeUUID(String nodeUUID)
    Sets the Node UUID.
    Parameters:
      `nodeUUID` - - UUID of the node.