add nodes attributes to cluster state

This commit is contained in:
kimchy 2010-09-27 10:46:11 +02:00
parent d9c2cc9d37
commit 1f3adc213f
1 changed files with 7 additions and 0 deletions

View File

@ -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<String, String> attr : node.attributes().entrySet()) {
builder.field(attr.getKey(), attr.getValue());
}
builder.endObject();
builder.endObject();
}
builder.endObject();