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 and Description
    `NodePlan()` Constructs an Empty Node Plan.
    `NodePlan(String datanodeName, int rpcPort)` Constructs an empty NodePlan.

  - ### Method Summary

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

    - #### NodePlan

          public NodePlan()

      Constructs an Empty Node Plan.

    - #### NodePlan

          public NodePlan(String datanodeName,
                          int rpcPort)

      Constructs an empty NodePlan.

  - ### Method Detail

    - #### 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:
        Map

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

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