From fffd09e7a2cec161296c2e9d6cd0979199b7fca5 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Fri, 7 Sep 2018 13:04:34 -0600 Subject: [PATCH 1/2] Rename "after" to "minimum_age" in lifecycle definition This renames the "after" field to better reflect what the meaning is. Supercedes #32624 --- .../en/ilm/set-up-lifecycle-policy.asciidoc | 2 +- .../en/ilm/using-policies-rollover.asciidoc | 6 ++-- .../xpack/core/indexlifecycle/Phase.java | 30 ++++++++--------- .../TimeseriesLifecycleType.java | 2 +- .../xpack/core/indexlifecycle/PhaseTests.java | 4 +-- .../indexlifecycle/PolicyStepsRegistry.java | 2 +- .../rest-api-spec/test/ilm/10_basic.yml | 32 +++++++++---------- .../test/ilm/20_move_to_step.yml | 4 +-- .../rest-api-spec/test/ilm/30_retry.yml | 4 +-- .../test/ilm/40_explain_lifecycle.yml | 4 +-- .../test/ilm/50_set_policy_for_index.yml | 8 ++--- .../test/ilm/60_operation_mode.yml | 4 +-- .../test/ilm/60_remove_policy_for_index.yml | 8 ++--- 13 files changed, 55 insertions(+), 55 deletions(-) diff --git a/x-pack/docs/en/ilm/set-up-lifecycle-policy.asciidoc b/x-pack/docs/en/ilm/set-up-lifecycle-policy.asciidoc index 7a21228264a84..37157bc0a075d 100644 --- a/x-pack/docs/en/ilm/set-up-lifecycle-policy.asciidoc +++ b/x-pack/docs/en/ilm/set-up-lifecycle-policy.asciidoc @@ -20,7 +20,7 @@ PUT _ilm/my_policy } }, "delete": { - "after": "30d", + "minimum_age": "30d", "actions": { "delete": {} <2> } diff --git a/x-pack/docs/en/ilm/using-policies-rollover.asciidoc b/x-pack/docs/en/ilm/using-policies-rollover.asciidoc index c2808e1e1efe4..c8c2e953ddb87 100644 --- a/x-pack/docs/en/ilm/using-policies-rollover.asciidoc +++ b/x-pack/docs/en/ilm/using-policies-rollover.asciidoc @@ -39,7 +39,7 @@ when the index size reaches 25GB. The old index is subsequently deleted after NOTE: Once an index rolls over, {ilm} uses the timestamp of the rollover operation rather than the index creation time to evaluate when to move the -index to the next phase. For indices that have rolled over, the `after` +index to the next phase. For indices that have rolled over, the `minimum_age` criteria specified for a phase is relative to the rollover time for indices. In this example, that means the index will be deleted 30 days after rollover, not 30 days from when the index was created. @@ -58,7 +58,7 @@ PUT /_ilm/my_policy } }, "delete": { - "after": "30d", + "minimum_age": "30d", "actions": { "delete": {} } @@ -112,4 +112,4 @@ suffix number for each subsequent index. When the rollover is performed, the newly-created index is set as the write index for the rolled over alias. Documents sent to the alias are indexed into -the new index, enabling indexing to continue uninterrupted. \ No newline at end of file +the new index, enabling indexing to continue uninterrupted. diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/Phase.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/Phase.java index 70617b81c7d77..e0ff413e0f08e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/Phase.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/Phase.java @@ -31,7 +31,7 @@ */ public class Phase implements ToXContentObject, Writeable { - public static final ParseField AFTER_FIELD = new ParseField("after"); + public static final ParseField MINIMUM_AGE = new ParseField("minimum_age"); public static final ParseField ACTIONS_FIELD = new ParseField("actions"); @SuppressWarnings("unchecked") @@ -40,7 +40,7 @@ public class Phase implements ToXContentObject, Writeable { .collect(Collectors.toMap(LifecycleAction::getWriteableName, Function.identity())))); static { PARSER.declareField(ConstructingObjectParser.optionalConstructorArg(), - (p, c) -> TimeValue.parseTimeValue(p.text(), AFTER_FIELD.getPreferredName()), AFTER_FIELD, ValueType.VALUE); + (p, c) -> TimeValue.parseTimeValue(p.text(), MINIMUM_AGE.getPreferredName()), MINIMUM_AGE, ValueType.VALUE); PARSER.declareNamedObjects(ConstructingObjectParser.constructorArg(), (p, c, n) -> p.namedObject(LifecycleAction.class, n, null), v -> { throw new IllegalArgumentException("ordered " + ACTIONS_FIELD.getPreferredName() + " are not supported"); @@ -53,12 +53,12 @@ public static Phase parse(XContentParser parser, String name) { private final String name; private final Map actions; - private final TimeValue after; + private final TimeValue minimumAge; /** * @param name * the name of this {@link Phase}. - * @param after + * @param minimumAge * the age of the index when the index should move to this * {@link Phase}. * @param actions @@ -67,12 +67,12 @@ public static Phase parse(XContentParser parser, String name) { * action names. The order of these actions is defined * by the {@link LifecycleType} */ - public Phase(String name, TimeValue after, Map actions) { + public Phase(String name, TimeValue minimumAge, Map actions) { this.name = name; - if (after == null) { - this.after = TimeValue.ZERO; + if (minimumAge == null) { + this.minimumAge = TimeValue.ZERO; } else { - this.after = after; + this.minimumAge = minimumAge; } this.actions = actions; } @@ -82,7 +82,7 @@ public Phase(String name, TimeValue after, Map actions) */ public Phase(StreamInput in) throws IOException { this.name = in.readString(); - this.after = in.readTimeValue(); + this.minimumAge = in.readTimeValue(); int size = in.readVInt(); TreeMap actions = new TreeMap<>(); for (int i = 0; i < size; i++) { @@ -94,7 +94,7 @@ public Phase(StreamInput in) throws IOException { @Override public void writeTo(StreamOutput out) throws IOException { out.writeString(name); - out.writeTimeValue(after); + out.writeTimeValue(minimumAge); out.writeVInt(actions.size()); for (Map.Entry entry : actions.entrySet()) { out.writeString(entry.getKey()); @@ -106,8 +106,8 @@ public void writeTo(StreamOutput out) throws IOException { * @return the age of the index when the index should move to this * {@link Phase}. */ - public TimeValue getAfter() { - return after; + public TimeValue getMinimumAge() { + return minimumAge; } /** @@ -128,7 +128,7 @@ public Map getActions() { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); - builder.field(AFTER_FIELD.getPreferredName(), after.getStringRep()); + builder.field(MINIMUM_AGE.getPreferredName(), minimumAge.getStringRep()); builder.field(ACTIONS_FIELD.getPreferredName(), actions); builder.endObject(); return builder; @@ -136,7 +136,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws @Override public int hashCode() { - return Objects.hash(name, after, actions); + return Objects.hash(name, minimumAge, actions); } @Override @@ -149,7 +149,7 @@ public boolean equals(Object obj) { } Phase other = (Phase) obj; return Objects.equals(name, other.name) && - Objects.equals(after, other.after) && + Objects.equals(minimumAge, other.minimumAge) && Objects.equals(actions, other.actions); } diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/TimeseriesLifecycleType.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/TimeseriesLifecycleType.java index 8181f791fd595..3af774b445b5e 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/TimeseriesLifecycleType.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/indexlifecycle/TimeseriesLifecycleType.java @@ -76,7 +76,7 @@ public List getOrderedPhases(Map phases) { } else if (phase.getActions().containsKey(ReadOnlyAction.NAME) == false){ Map actionMap = new HashMap<>(phase.getActions()); actionMap.put(ReadOnlyAction.NAME, ReadOnlyAction.INSTANCE); - phase = new Phase(phase.getName(), phase.getAfter(), actionMap); + phase = new Phase(phase.getName(), phase.getMinimumAge(), actionMap); } } if (phase != null) { diff --git a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/PhaseTests.java b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/PhaseTests.java index ced0bc8eaf20b..ea91cefe5c334 100644 --- a/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/PhaseTests.java +++ b/x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/indexlifecycle/PhaseTests.java @@ -69,7 +69,7 @@ protected NamedXContentRegistry xContentRegistry() { @Override protected Phase mutateInstance(Phase instance) throws IOException { String name = instance.getName(); - TimeValue after = instance.getAfter(); + TimeValue after = instance.getMinimumAge(); Map actions = instance.getActions(); switch (between(0, 2)) { case 0: @@ -90,6 +90,6 @@ protected Phase mutateInstance(Phase instance) throws IOException { public void testDefaultAfter() { Phase phase = new Phase(randomAlphaOfLength(20), null, Collections.emptyMap()); - assertEquals(TimeValue.ZERO, phase.getAfter()); + assertEquals(TimeValue.ZERO, phase.getMinimumAge()); } } diff --git a/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java index 562b51d096d1d..eba3835551d71 100644 --- a/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java +++ b/x-pack/plugin/ilm/src/main/java/org/elasticsearch/xpack/indexlifecycle/PolicyStepsRegistry.java @@ -271,7 +271,7 @@ public TimeValue getIndexAgeForPhase(final String policy, final String phase) { // We don't have that phase registered, proceed right through it return TimeValue.ZERO; } else { - return retrievedPhase.getAfter(); + return retrievedPhase.getMinimumAge(); } } } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml index eb004d2afa0ed..51ef9b5a5be5e 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/10_basic.yml @@ -25,7 +25,7 @@ setup: "policy": { "phases": { "warm": { - "after": "10s", + "minimum_age": "10s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -33,7 +33,7 @@ setup: } }, "delete": { - "after": "30s", + "minimum_age": "30s", "actions": { "delete": {} } @@ -48,8 +48,8 @@ setup: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.version: 1 } - is_true: my_timeseries_lifecycle.modified_date - - match: { my_timeseries_lifecycle.policy.phases.warm.after: "10s" } - - match: { my_timeseries_lifecycle.policy.phases.delete.after: "30s" } + - match: { my_timeseries_lifecycle.policy.phases.warm.minimum_age: "10s" } + - match: { my_timeseries_lifecycle.policy.phases.delete.minimum_age: "30s" } - do: acknowledge: true @@ -72,7 +72,7 @@ setup: "policy": { "phases": { "warm": { - "after": "10s", + "minimum_age": "10s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -80,7 +80,7 @@ setup: } }, "delete": { - "after": "30s", + "minimum_age": "30s", "actions": { "delete": {} } @@ -95,8 +95,8 @@ setup: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.version: 1 } - is_true: my_timeseries_lifecycle.modified_date - - match: { my_timeseries_lifecycle.policy.phases.warm.after: "10s" } - - match: { my_timeseries_lifecycle.policy.phases.delete.after: "30s" } + - match: { my_timeseries_lifecycle.policy.phases.warm.minimum_age: "10s" } + - match: { my_timeseries_lifecycle.policy.phases.delete.minimum_age: "30s" } - do: @@ -122,7 +122,7 @@ setup: "policy": { "phases": { "warm": { - "after": "300s", + "minimum_age": "300s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -130,7 +130,7 @@ setup: } }, "delete": { - "after": "600s", + "minimum_age": "600s", "actions": { "delete": {} } @@ -145,8 +145,8 @@ setup: lifecycle: "my_timeseries_lifecycle" - match: { my_timeseries_lifecycle.version: 2 } - is_true: my_timeseries_lifecycle.modified_date - - match: { my_timeseries_lifecycle.policy.phases.warm.after: "300s" } - - match: { my_timeseries_lifecycle.policy.phases.delete.after: "600s" } + - match: { my_timeseries_lifecycle.policy.phases.warm.minimum_age: "300s" } + - match: { my_timeseries_lifecycle.policy.phases.delete.minimum_age: "600s" } - do: acknowledge: true @@ -178,7 +178,7 @@ setup: "policy": { "phases": { "warm": { - "after": "10s", + "minimum_age": "10s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -186,7 +186,7 @@ setup: } }, "delete": { - "after": "30s", + "minimum_age": "30s", "actions": { "delete": {} } @@ -199,8 +199,8 @@ setup: acknowledge: true ilm.get_lifecycle: lifecycle: "my_timeseries_lifecycle" - - match: { my_timeseries_lifecycle.policy.phases.warm.after: "10s" } - - match: { my_timeseries_lifecycle.policy.phases.delete.after: "30s" } + - match: { my_timeseries_lifecycle.policy.phases.warm.minimum_age: "10s" } + - match: { my_timeseries_lifecycle.policy.phases.delete.minimum_age: "30s" } - do: indices.create: diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml index 9d3bfaa4467b6..7e584ff1c70a8 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/20_move_to_step.yml @@ -12,7 +12,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -20,7 +20,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml index 3c3cd9d90523e..f6a3ba0b93257 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/30_retry.yml @@ -13,7 +13,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -21,7 +21,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml index 68af871c3e6f7..91e1db0d5953f 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/40_explain_lifecycle.yml @@ -12,7 +12,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -20,7 +20,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml index cd012e9afef4e..692f4b7796832 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/50_set_policy_for_index.yml @@ -12,7 +12,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -20,7 +20,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } @@ -41,7 +41,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -49,7 +49,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml index 348b9d9d3d42d..a1c35c3413ff5 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_operation_mode.yml @@ -19,7 +19,7 @@ setup: "policy": { "phases": { "warm": { - "after": "10s", + "minimum_age": "10s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -27,7 +27,7 @@ setup: } }, "delete": { - "after": "30s", + "minimum_age": "30s", "actions": { "delete": {} } diff --git a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml index 97ab6406324fa..aafc406d8cc71 100644 --- a/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml +++ b/x-pack/plugin/src/test/resources/rest-api-spec/test/ilm/60_remove_policy_for_index.yml @@ -12,7 +12,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -20,7 +20,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } @@ -41,7 +41,7 @@ setup: "policy": { "phases": { "warm": { - "after": "1000s", + "minimum_age": "1000s", "actions": { "forcemerge": { "max_num_segments": 10000 @@ -49,7 +49,7 @@ setup: } }, "hot": { - "after": "1000s", + "minimum_age": "1000s", "actions": { } } } From d2b04b3e8c2762f815bca9d89e8a2af5e8ce1c72 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Fri, 7 Sep 2018 16:55:11 -0600 Subject: [PATCH 2/2] Rename "after" in HLRC also --- .../client/indexlifecycle/Phase.java | 26 +++++++++---------- .../client/indexlifecycle/PhaseTests.java | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/Phase.java b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/Phase.java index 9a1e31396cbd4..6dcd77bce3b59 100644 --- a/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/Phase.java +++ b/client/rest-high-level/src/main/java/org/elasticsearch/client/indexlifecycle/Phase.java @@ -40,7 +40,7 @@ */ public class Phase implements ToXContentObject { - static final ParseField AFTER_FIELD = new ParseField("after"); + static final ParseField MINIMUM_AGE = new ParseField("minimum_age"); static final ParseField ACTIONS_FIELD = new ParseField("actions"); @SuppressWarnings("unchecked") @@ -49,7 +49,7 @@ public class Phase implements ToXContentObject { .collect(Collectors.toMap(LifecycleAction::getName, Function.identity())))); static { PARSER.declareField(ConstructingObjectParser.optionalConstructorArg(), - (p, c) -> TimeValue.parseTimeValue(p.text(), AFTER_FIELD.getPreferredName()), AFTER_FIELD, ValueType.VALUE); + (p, c) -> TimeValue.parseTimeValue(p.text(), MINIMUM_AGE.getPreferredName()), MINIMUM_AGE, ValueType.VALUE); PARSER.declareNamedObjects(ConstructingObjectParser.constructorArg(), (p, c, n) -> p.namedObject(LifecycleAction.class, n, null), v -> { throw new IllegalArgumentException("ordered " + ACTIONS_FIELD.getPreferredName() + " are not supported"); @@ -62,12 +62,12 @@ public static Phase parse(XContentParser parser, String name) { private final String name; private final Map actions; - private final TimeValue after; + private final TimeValue minimumAge; /** * @param name * the name of this {@link Phase}. - * @param after + * @param minimumAge * the age of the index when the index should move to this * {@link Phase}. * @param actions @@ -75,12 +75,12 @@ public static Phase parse(XContentParser parser, String name) { * during this {@link Phase}. The keys in this map are the associated * action names. */ - public Phase(String name, TimeValue after, Map actions) { + public Phase(String name, TimeValue minimumAge, Map actions) { this.name = name; - if (after == null) { - this.after = TimeValue.ZERO; + if (minimumAge == null) { + this.minimumAge = TimeValue.ZERO; } else { - this.after = after; + this.minimumAge = minimumAge; } this.actions = actions; } @@ -89,8 +89,8 @@ public Phase(String name, TimeValue after, Map actions) * @return the age of the index when the index should move to this * {@link Phase}. */ - public TimeValue getAfter() { - return after; + public TimeValue getMinimumAge() { + return minimumAge; } /** @@ -111,7 +111,7 @@ public Map getActions() { @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject(); - builder.field(AFTER_FIELD.getPreferredName(), after.getStringRep()); + builder.field(MINIMUM_AGE.getPreferredName(), minimumAge.getStringRep()); builder.field(ACTIONS_FIELD.getPreferredName(), actions); builder.endObject(); return builder; @@ -119,7 +119,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws @Override public int hashCode() { - return Objects.hash(name, after, actions); + return Objects.hash(name, minimumAge, actions); } @Override @@ -132,7 +132,7 @@ public boolean equals(Object obj) { } Phase other = (Phase) obj; return Objects.equals(name, other.name) && - Objects.equals(after, other.after) && + Objects.equals(minimumAge, other.minimumAge) && Objects.equals(actions, other.actions); } diff --git a/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/PhaseTests.java b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/PhaseTests.java index 3c684ab3d722b..1865c4143d21b 100644 --- a/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/PhaseTests.java +++ b/client/rest-high-level/src/test/java/org/elasticsearch/client/indexlifecycle/PhaseTests.java @@ -71,6 +71,6 @@ protected boolean supportsUnknownFields() { public void testDefaultAfter() { Phase phase = new Phase(randomAlphaOfLength(20), null, Collections.emptyMap()); - assertEquals(TimeValue.ZERO, phase.getAfter()); + assertEquals(TimeValue.ZERO, phase.getMinimumAge()); } }