Use "_in_millis" for the suffix of delay times

Also change the javadoc to say "milliseconds" instead of "nanoseconds"
This commit is contained in:
Lee Hinman 2016-04-27 08:35:33 -06:00
parent 93afac0776
commit 1c0fc0a914
1 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ public final class ClusterAllocationExplanation implements ToXContent, Writeable
return this.unassignedInfo; return this.unassignedInfo;
} }
/** Return the remaining allocation delay for this shard in nanoseconds */ /** Return the remaining allocation delay for this shard in millisocends */
public long getRemainingDelayMillis() { public long getRemainingDelayMillis() {
return this.remainingDelayMillis; return this.remainingDelayMillis;
} }
@ -142,8 +142,8 @@ public final class ClusterAllocationExplanation implements ToXContent, Writeable
if (unassignedInfo != null) { if (unassignedInfo != null) {
unassignedInfo.toXContent(builder, params); unassignedInfo.toXContent(builder, params);
long delay = unassignedInfo.getLastComputedLeftDelayNanos(); long delay = unassignedInfo.getLastComputedLeftDelayNanos();
builder.timeValueField("allocation_delay_ms", "allocation_delay", TimeValue.timeValueNanos(delay)); builder.timeValueField("allocation_delay_in_millis", "allocation_delay", TimeValue.timeValueNanos(delay));
builder.timeValueField("remaining_delay_ms", "remaining_delay", TimeValue.timeValueMillis(remainingDelayMillis)); builder.timeValueField("remaining_delay_in_millis", "remaining_delay", TimeValue.timeValueMillis(remainingDelayMillis));
} }
builder.startObject("nodes"); builder.startObject("nodes");
for (NodeExplanation explanation : nodeExplanations.values()) { for (NodeExplanation explanation : nodeExplanations.values()) {