add the version number to the json multicast response

This commit is contained in:
Shay Banon 2011-12-12 20:35:17 +02:00
parent ce999489d5
commit 5d65b98611
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ package org.elasticsearch.discovery.zen.ping.multicast;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.ElasticSearchIllegalStateException;
import org.elasticsearch.Version;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodes;
@ -445,6 +446,7 @@ public class MulticastZenPing extends AbstractLifecycleComponent<ZenPing> implem
XContentBuilder builder = XContentFactory.contentBuilder(contentType);
builder.startObject().startObject("response");
builder.field("cluster_name", MulticastZenPing.this.clusterName.value());
builder.startObject("version").field("number", Version.CURRENT.number()).field("snapshot_build", Version.CURRENT.snapshot).endObject();
builder.field("transport_address", localNode.address().toString());
if (nodesProvider.nodeService() != null) {