From 6b6a4683272076c656300dbaa5b71be908b470f2 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Mon, 30 Sep 2013 10:54:30 +0200 Subject: [PATCH] serialize timestamp on the response --- .../action/admin/cluster/node/stats/NodeStats.java | 1 - .../action/admin/cluster/node/stats/NodesStatsResponse.java | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java index d7d5146db1f..1c709508002 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodeStats.java @@ -281,7 +281,6 @@ public class NodeStats extends NodeOperationResponse implements ToXContent { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { - builder.field("timestamp", getTimestamp()); builder.field("name", getNode().name(), XContentBuilder.FieldCaseConversion.NONE); builder.field("transport_address", getNode().address().toString(), XContentBuilder.FieldCaseConversion.NONE); diff --git a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java index 72f3bee8e63..5441822d798 100644 --- a/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java +++ b/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsResponse.java @@ -28,7 +28,6 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import java.io.IOException; -import java.util.Map; /** * @@ -67,7 +66,7 @@ public class NodesStatsResponse extends NodesOperationResponse implem builder.startObject("nodes"); for (NodeStats nodeStats : this) { builder.startObject(nodeStats.getNode().id(), XContentBuilder.FieldCaseConversion.NONE); - + builder.field("timestamp", nodeStats.getTimestamp()); nodeStats.toXContent(builder, params); builder.endObject();