diff --git a/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java b/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java index 1e5ef15b28a..6f8341087e7 100644 --- a/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java +++ b/src/main/java/org/elasticsearch/cluster/routing/RoutingNode.java @@ -175,6 +175,22 @@ public class RoutingNode implements Iterable { return sb.toString(); } + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("routingNode (["); + sb.append(node.getName()); + sb.append("]["); + sb.append(node.getId()); + sb.append("]["); + sb.append(node.getHostName()); + sb.append("]["); + sb.append(node.getHostAddress()); + sb.append("], ["); + sb.append(shards.size()); + sb.append(" assigned shards])"); + return sb.toString(); + } + public MutableShardRouting get(int i) { return shards.get(i) ; }