From 5ef421e77969c60f326a83d5e246e67bec53b0ed Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 2 Jun 2010 01:10:43 +0300 Subject: [PATCH] Nodes Info API: Failed to generate REST response when node attributes are set, closes #201. --- .../action/admin/cluster/node/info/RestNodesInfoAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java index 6a39e216380..e031d06f791 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/node/info/RestNodesInfoAction.java @@ -70,11 +70,11 @@ public class RestNodesInfoAction extends BaseRestHandler { builder.field("name", nodeInfo.node().name()); builder.field("transport_address", nodeInfo.node().address().toString()); - builder.startArray("attributes"); + builder.startObject("attributes"); for (Map.Entry attr : nodeInfo.node().attributes().entrySet()) { builder.field(attr.getKey(), attr.getValue()); } - builder.endArray(); + builder.endObject(); for (Map.Entry nodeAttribute : nodeInfo.attributes().entrySet()) { builder.field(nodeAttribute.getKey(), nodeAttribute.getValue());