Class NodePlan
java.lang.Object
org.apache.hadoop.hdfs.server.diskbalancer.planner.NodePlan
NodePlan is a set of volumeSetPlans.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the DataNode URI.gets the Node UUID.intgetPort()Gets the DataNode RPC Port.longreturns timestamp when this plan was created.Returns a Map of VolumeSetIDs and volumeSetPlans.static NodePlanParses a JSON string and converts to NodePlan.voidsetNodeName(String nodeName) Sets Node Name.voidsetNodeUUID(String nodeUUID) Sets the Node UUID.voidsetPort(int port) Sets the DataNode RPC Port.voidsetTimeStamp(long timeStamp) Sets the timestamp when this plan was created.voidSets the DataNodeURI.voidsetVolumeSetPlans(List<Step> volumeSetPlans) Sets a volume List plan.toJson()Returns a JSON representation of NodePlan.
-
Constructor Details
-
NodePlan
public NodePlan()Constructs an Empty Node Plan. -
NodePlan
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
Returns a Map of VolumeSetIDs and volumeSetPlans.- Returns:
- List of Steps
-
setNodeName
Sets Node Name.- Parameters:
nodeName- - Name
-
setVolumeSetPlans
Sets a volume List plan.- Parameters:
volumeSetPlans- - List of plans.
-
getNodeName
Returns the DataNode URI.- Returns:
- URI
-
setURI
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
Parses a JSON string and converts to NodePlan.- Parameters:
json- - JSON String- Returns:
- NodePlan
- Throws:
IOException
-
toJson
Returns a JSON representation of NodePlan.- Returns:
- - JSON String
- Throws:
IOException
-
getNodeUUID
gets the Node UUID.- Returns:
- Node UUID.
-
setNodeUUID
Sets the Node UUID.- Parameters:
nodeUUID- - UUID of the node.
-