From 941ffe0bf90ac285057a241053e709f7b79df217 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Wed, 5 Mar 2014 17:56:09 +0000 Subject: [PATCH] if there is no master node id, make sure not to fail the cat call, and report x --- .../java/org/elasticsearch/rest/action/cat/RestNodesAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5cc4c178138..56d8a4bbb92 100644 --- a/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java +++ b/src/main/java/org/elasticsearch/rest/action/cat/RestNodesAction.java @@ -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());