Add hostname to nodeinfo(#6156)

This commit is contained in:
ashione
2019-11-19 15:03:46 +08:00
committed by Qing Wang
parent f9d2d106b1
commit a1744f67fe
5 changed files with 16 additions and 4 deletions
@@ -12,14 +12,17 @@ public class NodeInfo {
public final String nodeAddress;
public final String nodeHostname;
public final boolean isAlive;
public final Map<String, Double> resources;
public NodeInfo(UniqueId nodeId, String nodeAddress,
public NodeInfo(UniqueId nodeId, String nodeAddress, String nodeHostname,
boolean isAlive, Map<String, Double> resources) {
this.nodeId = nodeId;
this.nodeAddress = nodeAddress;
this.nodeHostname = nodeHostname;
this.isAlive = isAlive;
this.resources = resources;
}
@@ -28,6 +31,7 @@ public class NodeInfo {
return "NodeInfo{"
+ "nodeId='" + nodeId + '\''
+ ", nodeAddress='" + nodeAddress + "\'"
+ ", nodeHostname'" + nodeHostname + "\'"
+ ", isAlive=" + isAlive
+ ", resources=" + resources
+ "}";