Prefer getHostAddress().

This commit is contained in:
Andrew Raines 2013-07-02 23:40:22 -05:00
parent 750f20d9d4
commit 0d57c4eafd
2 changed files with 3 additions and 3 deletions

View File

@ -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)));

View File

@ -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());
}