public class DiskBalancerDataNode extends Object implements Comparable<DiskBalancerDataNode>
| Constructor and Description | 
|---|
| DiskBalancerDataNode()Constructs an Empty Data Node. | 
| DiskBalancerDataNode(String dataNodeID)Constructs a DataNode. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addVolume(DiskBalancerVolume volume)Adds a volume to the DataNode. | 
| int | compareTo(DiskBalancerDataNode that)Compares this object with the specified object for order. | 
| void | computeNodeDensity()Computes nodes data density. | 
| boolean | equals(Object obj)Indicates whether some other object is "equal to" this one. | 
| String | getDataNodeIP()Returns the IP address of this Node. | 
| String | getDataNodeName()Get DataNode DNS name. | 
| int | getDataNodePort()Returns the Port of this DataNode. | 
| String | getDataNodeUUID()Returns datanode ID. | 
| double | getNodeDataDensity()Returns NodeDataDensity Metric. | 
| int | getVolumeCount()Returns how many volumes are in the DataNode. | 
| Map<String,DiskBalancerVolumeSet> | getVolumeSets()Returns the Volume sets on this node. | 
| int | hashCode()Returns a hash code value for the object. | 
| boolean | isBalancingNeeded(double threshold)Computes if this node needs balancing at all. | 
| void | setDataNodeIP(String ipaddress)Sets the IP address of this Node. | 
| void | setDataNodeName(String name)Sets node's DNS name. | 
| void | setDataNodePort(int port)Sets the DataNode Port number. | 
| void | setDataNodeUUID(String nodeID)Sets Datanode UUID. | 
public DiskBalancerDataNode()
public DiskBalancerDataNode(String dataNodeID)
dataNodeID - - Node IDpublic String getDataNodeIP()
public void setDataNodeIP(String ipaddress)
ipaddress - - IP Addresspublic int getDataNodePort()
public void setDataNodePort(int port)
port - - Datanode Port Numberpublic String getDataNodeName()
public void setDataNodeName(String name)
name - - Data node namepublic Map<String,DiskBalancerVolumeSet> getVolumeSets()
public String getDataNodeUUID()
public void setDataNodeUUID(String nodeID)
nodeID - - Node ID.public boolean equals(Object obj)
public int compareTo(DiskBalancerDataNode that)
compareTo in interface Comparable<DiskBalancerDataNode>that - the object to be compared.NullPointerException - if the specified object is nullClassCastException - if the specified object's type prevents it
                              from being compared to this object.public int hashCode()
HashMap.public double getNodeDataDensity()
public void computeNodeDensity()
public boolean isBalancingNeeded(double threshold)
threshold - - Percentagepublic void addVolume(DiskBalancerVolume volume) throws Exception
volume - - volumeExceptionpublic int getVolumeCount()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.