Skip to content

rename ILM Phase "minimum_age" to "min_age" #35058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public class Phase implements ToXContentObject {

static final ParseField MINIMUM_AGE = new ParseField("minimum_age");
static final ParseField MIN_AGE = new ParseField("min_age");
static final ParseField ACTIONS_FIELD = new ParseField("actions");

@SuppressWarnings("unchecked")
Expand All @@ -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(), MINIMUM_AGE.getPreferredName()), MINIMUM_AGE, ValueType.VALUE);
(p, c) -> TimeValue.parseTimeValue(p.text(), MIN_AGE.getPreferredName()), MIN_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");
Expand Down Expand Up @@ -111,7 +111,7 @@ public Map<String, LifecycleAction> getActions() {
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject();
builder.field(MINIMUM_AGE.getPreferredName(), minimumAge.getStringRep());
builder.field(MIN_AGE.getPreferredName(), minimumAge.getStringRep());
builder.field(ACTIONS_FIELD.getPreferredName(), actions);
builder.endObject();
return builder;
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/apis/delete-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/ilm/apis/explain.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ When the index is first taken over by ILM you will see a response like the follo
<1> Shows if the index is being managed by ILM. If the index is not managed by
ILM the other fields will not be shown
<2> The name of the policy which ILM is using for this index
<3> The timestamp used for the `minimum_age`
<3> The timestamp used for the `min_age`
<4> The current phase
<5> The timestamp for when the index entered the current phase
<6> The current action
Expand Down Expand Up @@ -151,7 +151,7 @@ phase definition has been completely executed.
"phase_execution": { <1>
"policy": "my_lifecycle3", <2>
"phase_definition": { <3>
"minimum_age": "0ms",
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "30s"
Expand Down Expand Up @@ -203,7 +203,7 @@ If the policy is waiting for a step to complete for the index, the response will
"phase_execution": {
"policy": "my_lifecycle3",
"phase_definition": {
"minimum_age": "0ms",
"min_age": "0ms",
"actions": {
"allocate": {
"number_of_replicas": 2,
Expand Down Expand Up @@ -262,7 +262,7 @@ that occurred in `step_info`.
"phase_execution": {
"policy": "my_lifecycle3",
"phase_definition": {
"minimum_age": "0ms",
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "30s"
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/ilm/apis/get-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down Expand Up @@ -91,15 +91,15 @@ If the request does not encounter errors, you receive the following result:
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/apis/move-to-step.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/apis/put-lifecycle.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/apis/remove-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/apis/start.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/apis/stop.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/ilm/set-up-lifecycle-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PUT _ilm/my_policy
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {} <2>
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/start-stop-ilm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ PUT _ilm/my_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
26 changes: 13 additions & 13 deletions docs/reference/ilm/update-lifecycle-policy.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PUT _ilm/my_policy
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down Expand Up @@ -65,7 +65,7 @@ PUT _ilm/my_policy
}
},
"delete": {
"minimum_age": "10d", <1>
"min_age": "10d", <1>
"actions": {
"delete": {}
}
Expand All @@ -76,7 +76,7 @@ PUT _ilm/my_policy
------------------------
// CONSOLE
// TEST[continued]
<1> update `minimum_age` to 10 days
<1> update `min_age` to 10 days

//////////
[source,js]
Expand All @@ -99,15 +99,15 @@ with its version bumped to 2.
"policy": {
"phases": {
"hot": {
"minimum_age": "0ms",
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "25gb"
}
}
},
"delete": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"delete": {}
}
Expand Down Expand Up @@ -148,7 +148,7 @@ PUT _ilm/my_executing_policy
}
},
"delete": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"delete": {}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ GET my_index/_ilm/explain
"modified_date_in_millis": 1538475653317,
"version": 1,
"phase_definition": {
"minimum_age": "0ms",
"min_age": "0ms",
"actions": {
"rollover": {
"max_docs": 1
Expand Down Expand Up @@ -231,15 +231,15 @@ PUT _ilm/my_executing_policy
"policy": {
"phases": {
"warm": {
"minimum_age": "1d",
"min_age": "1d",
"actions": {
"forcemerge": {
"max_num_segments": 1
}
}
},
"delete": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"delete": {}
}
Expand Down Expand Up @@ -283,7 +283,7 @@ GET my_index/_ilm/explain
"modified_date_in_millis": 1538475653317,
"version": 1,
"phase_definition": {
"minimum_age": "0ms",
"min_age": "0ms",
"actions": {
"rollover": {
"max_docs": 1
Expand Down Expand Up @@ -339,7 +339,7 @@ GET my_index/_ilm/explain
"modified_date_in_millis": 1538475653317,
"version": 2, <1>
"phase_definition": {
"minimum_age": "1d",
"min_age": "1d",
"actions": {
"forcemerge": {
"max_num_segments": 1
Expand Down Expand Up @@ -383,7 +383,7 @@ PUT _ilm/my_policy
}
},
"delete": {
"minimum_age": "10d",
"min_age": "10d",
"actions": {
"delete": {}
}
Expand All @@ -397,7 +397,7 @@ PUT _ilm/my_other_policy
"policy": {
"phases": {
"delete": {
"minimum_age": "1d",
"min_age": "1d",
"actions": {
"delete": {}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ilm/using-policies-rollover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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 `minimum_age`
index to the next phase. For indices that have rolled over, the `min_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.
Expand All @@ -60,7 +60,7 @@ PUT /_ilm/my_policy
}
},
"delete": {
"minimum_age": "30d",
"min_age": "30d",
"actions": {
"delete": {}
}
Expand Down
Loading