Handle node id shorter than the usual randomBase64UUID.

Fixes #4572 (half of it...)
This commit is contained in:
Andrew Raines 2014-01-09 10:48:05 -06:00
parent da14b5f5e4
commit ca454248a7
2 changed files with 3 additions and 1 deletions

View File

@ -184,6 +184,7 @@ public class RestAllocationAction extends AbstractCatAction {
table.addCell(null);
table.addCell(null);
table.addCell(null);
table.addCell(null);
table.addCell("UNASSIGNED");
table.endRow();
}

View File

@ -31,6 +31,7 @@ import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.Table;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
@ -221,7 +222,7 @@ public class RestNodesAction extends AbstractCatAction {
table.startRow();
table.addCell(fullId ? node.id() : node.id().substring(0, 4));
table.addCell(fullId ? node.id() : Strings.substring(node.getId(), 0, 4));
table.addCell(info == null ? null : info.getProcess().id());
table.addCell(node.getHostName());
table.addCell(node.getHostAddress());