serialize timestamp on the response

This commit is contained in:
Shay Banon 2013-09-30 10:54:30 +02:00
parent 62a09fd207
commit 6b6a468327
2 changed files with 1 additions and 3 deletions

View File

@ -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);

View File

@ -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<NodeStats> 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();