diff --git a/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java b/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java index bcad6e10db344..29c88256d81ab 100644 --- a/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java +++ b/src/main/java/org/elasticsearch/rest/action/cat/RestAllocationAction.java @@ -184,6 +184,7 @@ private Table buildTable(RestRequest request, final ClusterStateResponse state, table.addCell(null); table.addCell(null); table.addCell(null); + table.addCell(null); table.addCell("UNASSIGNED"); table.endRow(); } diff --git a/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java b/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java index a04e770f395d5..9955d19fb31da 100644 --- a/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java +++ b/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java @@ -31,6 +31,7 @@ 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 @@ private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoR 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());