Fix mixed up duration and duration_in_millis fields in snapshot information output

This commit is contained in:
Igor Motov 2014-01-07 14:24:02 -05:00
parent 5d98341d11
commit 2b49ec138c
1 changed files with 1 additions and 2 deletions

View File

@ -209,8 +209,7 @@ public class SnapshotInfo implements ToXContent, Streamable {
if (endTime != 0) {
builder.field(Fields.END_TIME, DATE_TIME_FORMATTER.printer().print(endTime));
builder.field(Fields.END_TIME_IN_MILLIS, endTime);
builder.field(Fields.DURATION, endTime - startTime);
builder.field(Fields.DURATION_IN_MILLIS, TimeValue.timeValueMillis(endTime - startTime));
builder.timeValueField(Fields.DURATION_IN_MILLIS, Fields.DURATION, endTime - startTime);
}
builder.startArray(Fields.FAILURES);
for (SnapshotShardFailure shardFailure : shardFailures) {