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
@@ -77,12 +77,14 @@ public class GcsClient {
if (data.getState() == GcsNodeInfo.GcsNodeState.ALIVE) {
//Code path of node insertion.
NodeInfo nodeInfo = new NodeInfo(
nodeId, data.getNodeManagerAddress(), true, new HashMap<>());
nodeId, data.getNodeManagerAddress(),
data.getNodeManagerHostname(),
true, new HashMap<>());
nodes.put(nodeId, nodeInfo);
} else {
// Code path of node deletion.
NodeInfo nodeInfo = new NodeInfo(nodeId, nodes.get(nodeId).nodeAddress,
false, new HashMap<>());
nodes.get(nodeId).nodeHostname, false, new HashMap<>());
nodes.put(nodeId, nodeInfo);
}
}