Prefer getHostAddress().
This commit is contained in:
parent
750f20d9d4
commit
0d57c4eafd
|
@ -63,7 +63,7 @@ public class RestMasterAction extends BaseRestHandler {
|
|||
tab.addRow(new Row()
|
||||
.addCell(clusterStateResponse.getState().nodes().masterNode().id())
|
||||
.addCell(((InetSocketTransportAddress)clusterStateResponse.getState().nodes()
|
||||
.masterNode().address()).address().getHostString())
|
||||
.masterNode().address()).address().getAddress().getHostAddress())
|
||||
.addCell(clusterStateResponse.getState().nodes().masterNode().name()));
|
||||
|
||||
channel.sendResponse(new StringRestResponse(status, tab.render(verbose)));
|
||||
|
|
|
@ -115,13 +115,13 @@ public class RestShardsAction extends BaseRestHandler {
|
|||
String nodeName = "";
|
||||
|
||||
if (shard.assignedToNode()) {
|
||||
host.append(((InetSocketTransportAddress) state.getState().nodes().get(shard.currentNodeId()).address()).address().getHostString());
|
||||
host.append(((InetSocketTransportAddress) state.getState().nodes().get(shard.currentNodeId()).address()).address().getAddress().getHostAddress());
|
||||
nodeName = state.getState().nodes().get(shard.currentNodeId()).name();
|
||||
}
|
||||
|
||||
if (shard.relocating()) {
|
||||
host.append(" -> ");
|
||||
host.append(((InetSocketTransportAddress) state.getState().nodes().get(shard.relocatingNodeId()).address()).address().getHostString());
|
||||
host.append(((InetSocketTransportAddress) state.getState().nodes().get(shard.relocatingNodeId()).address()).address().getAddress().getHostAddress());
|
||||
host.append(state.getState().nodes().get(shard.relocatingNodeId()).name());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue