From 1c0fc0a9148d2a2b6e15799d7315051a181e6316 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Wed, 27 Apr 2016 08:35:33 -0600 Subject: [PATCH] Use "_in_millis" for the suffix of delay times Also change the javadoc to say "milliseconds" instead of "nanoseconds" --- .../cluster/allocation/ClusterAllocationExplanation.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java index eae221370de..dbabe681c7a 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplanation.java @@ -114,7 +114,7 @@ public final class ClusterAllocationExplanation implements ToXContent, Writeable 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() { return this.remainingDelayMillis; } @@ -142,8 +142,8 @@ public final class ClusterAllocationExplanation implements ToXContent, Writeable if (unassignedInfo != null) { unassignedInfo.toXContent(builder, params); long delay = unassignedInfo.getLastComputedLeftDelayNanos(); - builder.timeValueField("allocation_delay_ms", "allocation_delay", TimeValue.timeValueNanos(delay)); - builder.timeValueField("remaining_delay_ms", "remaining_delay", TimeValue.timeValueMillis(remainingDelayMillis)); + builder.timeValueField("allocation_delay_in_millis", "allocation_delay", TimeValue.timeValueNanos(delay)); + builder.timeValueField("remaining_delay_in_millis", "remaining_delay", TimeValue.timeValueMillis(remainingDelayMillis)); } builder.startObject("nodes"); for (NodeExplanation explanation : nodeExplanations.values()) {