From 1f3adc213ff9efcfa10e3440d261883af4b7e820 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 27 Sep 2010 10:46:11 +0200 Subject: [PATCH] add nodes attributes to cluster state --- .../action/admin/cluster/state/RestClusterStateAction.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java index 0454d15ebec..97558f3a64b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/rest/action/admin/cluster/state/RestClusterStateAction.java @@ -120,6 +120,13 @@ public class RestClusterStateAction extends BaseRestHandler { builder.startObject(node.id()); builder.field("name", node.name()); builder.field("transport_address", node.address().toString()); + + builder.startObject("attributes"); + for (Map.Entry attr : node.attributes().entrySet()) { + builder.field(attr.getKey(), attr.getValue()); + } + builder.endObject(); + builder.endObject(); } builder.endObject();