serialize timestamp on the response
This commit is contained in:
parent
62a09fd207
commit
6b6a468327
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue