if there is no master node id, make sure not to fail the cat call, and report x

This commit is contained in:
Shay Banon 2014-03-05 17:56:09 +00:00
parent 98ecf80f07
commit 941ffe0bf9
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ public class RestNodesAction extends AbstractCatAction {
table.addCell(stats == null ? null : stats.getOs() == null ? null : stats.getOs().getLoadAverage().length < 1 ? null : String.format(Locale.ROOT, "%.2f", stats.getOs().getLoadAverage()[0]));
table.addCell(stats == null ? null : stats.getJvm().uptime());
table.addCell(node.clientNode() ? "c" : node.dataNode() ? "d" : "-");
table.addCell(masterId.equals(node.id()) ? "*" : node.masterNode() ? "m" : "-");
table.addCell(masterId == null ? "x" : masterId.equals(node.id()) ? "*" : node.masterNode() ? "m" : "-");
table.addCell(node.name());
table.addCell(stats == null ? null : stats.getIndices().getCompletion().getSize());