most master node outside of the nodes section, so all elements in nodes will have the same strucutre

This commit is contained in:
kimchy 2010-06-03 14:30:54 +03:00
parent d9ec629473
commit c68787aa4c
1 changed files with 2 additions and 1 deletions

View File

@ -65,9 +65,10 @@ public class RestClusterStateAction extends BaseRestHandler {
builder.field("cluster_name", response.clusterName().value());
builder.field("master_node", state.nodes().masterNodeId());
// nodes
builder.startObject("nodes");
builder.field("_master", state.nodes().masterNodeId());
for (DiscoveryNode node : state.nodes()) {
builder.startObject(node.id());
builder.field("name", node.name());