Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
484 commits
Select commit Hold shift + click to select a range
8ac260d
Removes erroreously added file
colings86 Jun 14, 2018
ce38127
Merge branch 'master' into index-lifecycle
colings86 Jun 14, 2018
d794253
Removes warnings from ILM code
colings86 Jun 14, 2018
2f00ef7
Merge branch 'master' into index-lifecycle
colings86 Jun 14, 2018
7412943
Removes unused stepsRegistry from move to step task
colings86 Jun 14, 2018
2af05e5
Merge branch 'master' into index-lifecycle
talevy Jun 14, 2018
80ab773
Move IndexLifecycleMetadata installation to put-lifecycle-action (#31…
talevy Jun 15, 2018
85d0613
Merge branch 'master' into index-lifecycle
talevy Jun 15, 2018
fe4d74c
fix merge messup
talevy Jun 15, 2018
c549377
Merge branch 'master' into index-lifecycle
talevy Jun 15, 2018
0193979
Introduce Maintenance Mode to ILM (#31164)
talevy Jun 15, 2018
aa6944a
render non-ElasticsearchException in ILM (#31284)
talevy Jun 15, 2018
5d52f29
Merge branch 'master' into index-lifecycle
talevy Jun 18, 2018
eee1a45
Merge branch 'master' into index-lifecycle
talevy Jun 19, 2018
01d456b
fix actions to reflect changes in master
talevy Jun 19, 2018
8677bfb
fix client signature
talevy Jun 19, 2018
c5b69c8
Merge branch 'master' into index-lifecycle
colings86 Jun 20, 2018
8d9b985
Merge branch 'master' into index-lifecycle
talevy Jun 20, 2018
4c55dbc
Merge branch 'master' into index-lifecycle
talevy Jun 20, 2018
dec6d49
Adds an API to remove ILM from an index completely (#31358)
colings86 Jun 21, 2018
3197606
Adds ability to update a policy (#31361)
colings86 Jun 21, 2018
fc2f982
inherit [index.lifecycle.date] from rolled-over time (#30853)
talevy Jun 21, 2018
901aafb
add APIs to Maintenance Mode in ILM (#31410)
talevy Jun 21, 2018
c9eec7e
Merge branch 'master' into index-lifecycle
talevy Jun 21, 2018
d062556
Merge branch 'master' into index-lifecycle
colings86 Jun 22, 2018
e6b427c
Fixes compile error due to client interface change
colings86 Jun 22, 2018
1d11fda
Merge branch 'master' into index-lifecycle
talevy Jun 22, 2018
2ba50db
IndexShard should not return null stats (#31528)
vladimirdolzhenko Jun 22, 2018
49387bf
Core: Combine doExecute methods in TransportAction (#31517)
rjernst Jun 22, 2018
baa9b85
[DOCS] Move monitoring to docs folder (#31477)
lcawl Jun 22, 2018
efffa02
[DOCS] Move sql to docs (#31474)
lcawl Jun 22, 2018
44e1c8e
TEST: Add bwc recovery tests with synced-flush index
dnhatn Jun 22, 2018
54d1b9e
[DOCS] Updates Watcher examples for code testing (#31152)
lcawl Jun 23, 2018
27bd688
Add get field mappings to High Level REST API Client (#31423)
vladimirdolzhenko Jun 23, 2018
43c2e2f
TEST: Correct the assertion arguments order (#31540)
olcbean Jun 24, 2018
0f95629
Ingest Attachment: Upgrade Tika to 1.18 (#31252)
jdconrad Jun 24, 2018
e6dc01d
Close xcontent parsers (partial) (#31513)
tomcallahan Jun 24, 2018
6be94db
turn GetFieldMappingsResponse to ToXContentObject (#31544)
vladimirdolzhenko Jun 25, 2018
b848ff2
Renames endpoints for setting and deleting ILM policies# (#31552)
colings86 Jun 25, 2018
2b53510
Merge branch 'master' into index-lifecycle
colings86 Jun 28, 2018
e9cd055
Merge branch 'master' into index-lifecycle
talevy Jul 9, 2018
952859d
Merge branch 'master' into index-lifecycle
talevy Jul 10, 2018
cd89ca2
Merge branch 'master' into index-lifecycle
colings86 Jul 11, 2018
4192f38
Merge branch 'master' into index-lifecycle
colings86 Jul 12, 2018
89e8f9e
Adds concept of a safe action (#31971)
colings86 Jul 12, 2018
ebf0dd4
Adds a check to only fail policy update if unsafe action is changed (…
colings86 Jul 12, 2018
5d3a538
Merge branch 'master' into index-lifecycle
colings86 Jul 16, 2018
6c77449
Merge branch 'master' into index-lifecycle
colings86 Jul 18, 2018
a019e72
Merge branch 'master' into index-lifecycle
talevy Jul 18, 2018
4ae0d4e
add ILM ShrinkAction IT (#32176)
talevy Jul 19, 2018
1acdd37
Merge branch 'master' into index-lifecycle
talevy Jul 19, 2018
573a9e6
Merge branch 'master' into index-lifecycle
colings86 Jul 20, 2018
5f696e1
Merge branch 'master' into index-lifecycle
colings86 Jul 23, 2018
1a1ae5d
add qa project for running ILM tests against security (#32218)
talevy Jul 23, 2018
a2abc86
Merge branch 'master' into index-lifecycle
colings86 Jul 24, 2018
e523030
Merge branch 'master' into index-lifecycle
talevy Jul 24, 2018
81faa2f
Merge branch 'master' into index-lifecycle
colings86 Jul 25, 2018
86928e7
Merge branch 'master' into index-lifecycle
talevy Jul 25, 2018
a75c6a2
Fix index-lifecycle build
jasontedor Jul 25, 2018
3daefe6
Remove "best_compression" option from the ForceMergeAction (#32373)
dakrone Jul 25, 2018
99e8b5b
Merge branch 'master' into index-lifecycle
colings86 Jul 26, 2018
dfb277c
Merge branch 'master' into index-lifecycle
colings86 Jul 27, 2018
b209f95
Fix serialisation bug
colings86 Jul 27, 2018
783e427
Skips to next available action on missing step (#32283)
colings86 Jul 27, 2018
0682b4b
Removes redundent NORELEASES and ObjectParserUtils (#32427)
colings86 Jul 30, 2018
59bb37b
Merge branch 'master' into index-lifecycle
colings86 Jul 30, 2018
dc97051
Make various LifecycleSettings Settings internal (#32381)
dakrone Jul 30, 2018
a314efc
Add high level rest client support for SetIndexLifecyclePolicy (#32443)
dakrone Jul 30, 2018
6e9f338
stop throwing an IllegalStateException for unrecognized steps (#32212)
talevy Jul 31, 2018
73cdfaf
Merge branch 'master' into index-lifecycle
talevy Jul 31, 2018
9a0f6b2
remove mention of old maintenance mode setting
talevy Jul 31, 2018
304304f
re-enable ILM integration tests and fix policyRegistry update bug (#3…
talevy Aug 1, 2018
ea1e26c
Merge branch 'master' into index-lifecycle
talevy Aug 1, 2018
1bb7b53
Make index.lifecycle.name setting internal (#32518)
dakrone Aug 2, 2018
5de236e
Rename ILM, ILM endpoints and drop _xpack (#32564)
jasontedor Aug 2, 2018
f716258
Merge branch 'master' into index-lifecycle
talevy Aug 2, 2018
6986c9f
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Aug 2, 2018
0a6a48b
[TEST] Fix HLRC using pre-rename endpoint for setting lifecycle policy
dakrone Aug 2, 2018
20915a9
Merge branch 'master' into index-lifecycle
colings86 Aug 3, 2018
9a81b9d
adds index_lifecycle to ignored API conventions
colings86 Aug 3, 2018
aadadb5
Fixes X-Pack loaded YAML test
colings86 Aug 3, 2018
78e94e1
Merge branch 'master' into index-lifecycle
talevy Aug 3, 2018
47a3e98
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Aug 3, 2018
457661e
fix smoke test with security reference to renamed ilm
talevy Aug 3, 2018
c13b85d
Merge branch 'master' into index-lifecycle
colings86 Aug 6, 2018
aed466d
Remove ILM constructor hacks (#32597)
dakrone Aug 6, 2018
7ea7dd8
Remove RolloverIndexTestHelper (#32559)
dakrone Aug 6, 2018
0a9c3ae
Remove UpdateSettingsTestHelper class (#32557)
dakrone Aug 6, 2018
0ad252d
change default indices.lifecycle.poll_interval to something sane (#32…
talevy Aug 6, 2018
b9c04ad
Merge branch 'master' into index-lifecycle
colings86 Aug 7, 2018
2d925c9
Merge branch 'master' into index-lifecycle
talevy Aug 8, 2018
2fc3f1d
move replicas action functionality into AllocateAction (#32523)
talevy Aug 8, 2018
5ff4f93
Adds explain lifecycle API to the Rest Client (#32606)
colings86 Aug 9, 2018
97ba7b8
Fix explain lifecycle REST API test failure
colings86 Aug 9, 2018
0fe2113
Merge branch 'master' into index-lifecycle
colings86 Aug 9, 2018
2305cb8
Fixes test after replicas removal
colings86 Aug 9, 2018
8750d62
Adds REST client support for starting and stopping ILM (#32609)
colings86 Aug 9, 2018
41e6d98
move qa yaml tests to inside the ILM plugin (#32693)
talevy Aug 9, 2018
c7a2c35
Merge branch 'master' into index-lifecycle
talevy Aug 10, 2018
93637e2
Merge branch 'master' into index-lifecycle
talevy Aug 10, 2018
a771478
Merge branch 'master' into index-lifecycle
talevy Aug 13, 2018
5011aa2
Set up ILM docs. (#32823)
debadair Aug 13, 2018
e78f537
Merge branch 'master' into index-lifecycle
talevy Aug 13, 2018
a84b323
Merge branch 'master' into index-lifecycle
colings86 Aug 14, 2018
b218b1c
introduce random timeseries lifecycle policy util method (#32852)
talevy Aug 14, 2018
92ecd1d
Merge branch 'master' into index-lifecycle
talevy Aug 15, 2018
ec93756
Merge branch 'master' into index-lifecycle
talevy Aug 15, 2018
d1ab5dd
fix merge with master
talevy Aug 15, 2018
4baa721
remove `type` config from LifecyclePolicy JSON (#32660)
talevy Aug 15, 2018
33522d4
update cluster-state task execution to halt on new phase (#32886)
talevy Aug 16, 2018
9406aa5
remove extraneous CreateIndexRequest context in ShrinkAction (#32893)
talevy Aug 16, 2018
238eb93
migrate allocate action pojo/xcontent to xpack.protocol (#32853)
talevy Aug 16, 2018
c9de707
Merge branch 'master' into index-lifecycle
talevy Aug 16, 2018
6281982
copy more actions to protocol.xpack (#32892)
talevy Aug 16, 2018
711ac40
Merge branch 'master' into index-lifecycle
talevy Aug 16, 2018
a26e108
Merge branch 'master' into index-lifecycle
talevy Aug 17, 2018
77016ad
Store phase steps for index in PolicyStepsRegistry (#32926)
dakrone Aug 18, 2018
3736097
Merge branch 'master' into index-lifecycle
colings86 Aug 20, 2018
5ce082c
copy LifecyclePolicy to protocol.xpack (#32915)
talevy Aug 20, 2018
2b3cb24
add INDEX_LIFECYCLE_ORIGIN to run as xpack
talevy Aug 20, 2018
81c9e8d
make operation mode YAML test more robust
colings86 Aug 21, 2018
10c60fa
Merge branch 'master' into index-lifecycle
colings86 Aug 21, 2018
75cae45
fix compile error after merge
colings86 Aug 21, 2018
6780ab9
add user authentication test for ILM (#32826)
talevy Aug 21, 2018
96869b2
conditionally update CS only if StepInfo changes (#33004)
talevy Aug 21, 2018
55cb08a
move ESLoggerFactory usage to LogManager (#33043)
talevy Aug 22, 2018
dfc70dd
rename pre-phase/pre-action to new/init (#32996)
talevy Aug 22, 2018
fd88ab8
Fixes shrink action to remove single ndoe allocation (#33091)
colings86 Aug 23, 2018
1f13c77
Merge branch 'master' into index-lifecycle
gwbrown Aug 23, 2018
191bd7c
Fix Gradle configuration
gwbrown Aug 23, 2018
650f12a
Duplicate Protocol classes into Core
gwbrown Aug 23, 2018
935b280
Merge branch 'master' into index-lifecycle
gwbrown Aug 23, 2018
52aa738
Remove canSetPolicy, canUpdatePolicy, and canRemovePolicy (#33037)
dakrone Aug 23, 2018
74312be
Merge branch 'master' into index-lifecycle
talevy Aug 24, 2018
5783545
Merge branch 'master' into index-lifecycle
talevy Aug 27, 2018
cfe0acc
separate out IndexLifecycleService cluster-state change concerns (#33…
talevy Aug 27, 2018
5036865
Merge branch 'master' into index-lifecycle
gwbrown Aug 27, 2018
dbf6ba7
Adds docs for how to set up a policy (#32987)
colings86 Aug 28, 2018
9d15796
change setup policy note
colings86 Aug 28, 2018
454ce99
Merge branch 'master' into index-lifecycle
gwbrown Aug 29, 2018
ba8d4eb
HLRC: Add Lifecycle Policy delete to the HLRC (#33142)
gwbrown Aug 29, 2018
5a705e9
HLRC: Add ILM Status to HLRC
jakelandis Aug 30, 2018
4257d05
Revert "HLRC: Add ILM Status to HLRC"
jakelandis Aug 30, 2018
2465451
HLRC: Add Put Lifecycle Policy API to HLRC (#33250)
gwbrown Aug 30, 2018
13a0d82
Merge branch 'master' into index-lifecycle
talevy Aug 30, 2018
4a958ee
fix shrunken index source name metadata usage
talevy Aug 30, 2018
ada3e71
Renames XPackField.INDEX _LIFCYCLE value to "ilm" (#33270)
colings86 Aug 31, 2018
3eef74d
Merge branch 'master' into index-lifecycle
colings86 Aug 31, 2018
e2c1beb
Merge branch 'master' into index-lifecycle
colings86 Sep 3, 2018
201e139
Adds documentation about defining rollover action in ILM (#33243)
colings86 Sep 3, 2018
92ab442
Merge branch 'master' into index-lifecycle
colings86 Sep 4, 2018
30544cb
Fixes Rendering of after in Phase (#33304)
colings86 Sep 4, 2018
f00a28a
Merge branch 'master' into index-lifecycle
colings86 Sep 5, 2018
a7b5f2c
Adds ILMClient for use with transport client (#33357)
colings86 Sep 5, 2018
0f8bc10
add new phase definition setting used for retrieving phase to execute…
talevy Sep 5, 2018
b5f7fb6
Merge branch 'master' into index-lifecycle
talevy Sep 5, 2018
023e1bf
fix test
talevy Sep 5, 2018
8b8ff2b
HLRC: Add ILM Status to HLRC (#33283)
jakelandis Sep 5, 2018
96d515e
Replace PhaseAfterStep with PhaseCompleteStep (#33398)
dakrone Sep 5, 2018
b1257d8
Merge branch 'master' into index-lifecycle
colings86 Sep 6, 2018
b335487
Fix qa build.gradle to gradle assemble works correctly
dakrone Sep 6, 2018
21bb472
add notion of version and modified_date to LifecyclePolicyMetadata (#…
talevy Sep 6, 2018
017ffe5
Merge branch 'master' into index-lifecycle
colings86 Sep 7, 2018
f836413
Adds checks to ensure index metadata exists when we try to use it (#3…
colings86 Sep 7, 2018
e0b99d7
move ILM client objects from protocol to client (#33532)
talevy Sep 7, 2018
8fa8dea
Encapsulate Client as class variable for PolicyStepsRegistry (#33529)
dakrone Sep 7, 2018
008e64b
HLRC: Add Get Lifecycle Policy API to HLRC (#33323)
gwbrown Sep 7, 2018
b7649fc
Rename "after" to "minimum_age" in lifecycle definition (#33530)
dakrone Sep 9, 2018
cdc4f57
Merge branch 'master' into index-lifecycle
colings86 Sep 10, 2018
f5a366a
Fixing merge problem
colings86 Sep 10, 2018
5a349ec
Renames lifecycle to policy in rest-api-spec (#33507)
colings86 Sep 11, 2018
8e59de3
Merge branch 'master' into index-lifecycle
colings86 Sep 13, 2018
1f048d3
Remove unneeded listener on MoveToNextStepUpdateTask (#33725)
dakrone Sep 14, 2018
e6cbaa5
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 14, 2018
7ff11b4
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 17, 2018
94a66c5
add phase execution info to ILM Explain API (#33488)
talevy Sep 18, 2018
c87cff2
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 18, 2018
11a55d2
[TEST] Handle an IndexLifecycleService that has not started up
dakrone Sep 18, 2018
27dd258
Rebuild step on PolicyStepsRegistry.getStep (#33780)
dakrone Sep 18, 2018
81e9150
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 19, 2018
90de436
Use custom index metadata for ILM state (#33783)
gwbrown Sep 19, 2018
243e863
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 24, 2018
c0bfc07
Only make indexes read-only on Shrink and ForceMerge actions (#33907)
gwbrown Sep 25, 2018
a26cc1a
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 27, 2018
6ea396a
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Sep 28, 2018
a49d598
Use more descriptive task names for ILM cluster state updates (#34161)
dakrone Oct 1, 2018
2d9cb21
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Oct 1, 2018
3afb8e8
Add Gradle attributes to CI jobs (#34178)
alpar-t Oct 2, 2018
fb90770
Merge branch 'master' into index-lifecycle
gwbrown Oct 2, 2018
388f754
Change step execution flow to be deliberate about type (#34126)
dakrone Oct 3, 2018
90c55f5
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Oct 3, 2018
f10735a
ILM integration test with full policy (#33402)
talevy Oct 3, 2018
d66a63e
[HLRC] Update Stop & Start ILM APIs to use Validatable (#34242)
gwbrown Oct 3, 2018
13d8929
Provide useful error when a policy doesn't exist (#34206)
gwbrown Oct 4, 2018
9ad2a7f
Fix expected next step being incorrect when executing async action (#…
dakrone Oct 8, 2018
0b42eda
Merge branch 'master' into index-lifecycle
colings86 Oct 15, 2018
80474e1
HLRC: Add remove index lifecycle policy (#34204)
jdconrad Oct 16, 2018
2846eff
initial api reference docs for ILM (#33866)
talevy Oct 16, 2018
fbe8dc0
Merge branch 'master' into index-lifecycle
talevy Oct 16, 2018
3a555da
update version on ILM setting updates
talevy Oct 16, 2018
335d268
fix timeout assertion in requestconvertertests
talevy Oct 16, 2018
fdb8507
fix setting version on deleting unmaanged indices with wildcard
talevy Oct 17, 2018
7c7605d
Merge branch 'master' into index-lifecycle
colings86 Oct 17, 2018
90f7cec
Merge branch 'master' into index-lifecycle
colings86 Oct 17, 2018
09067c8
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 17, 2018
9cb0bb8
Rework ILM build to separate integration tests (#34617)
gwbrown Oct 18, 2018
84ef915
Merge branch 'master' into index-lifecycle
colings86 Oct 19, 2018
910e974
HLRC: Add ILM Retry (#33990)
original-brownbear Oct 19, 2018
67bfdb1
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 22, 2018
9b80017
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 23, 2018
59b28da
[ILM] Add null check to CopyExecutionStateStep (#34619)
gwbrown Oct 23, 2018
62ac2fa
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 23, 2018
c5a264e
Ensure phase_time is set when in the "new" phase (#34280)
dakrone Oct 23, 2018
89404ce
Fixes SOTP docs test to restart ILM after
colings86 Oct 24, 2018
c7fe87e
Removes Set Policy API in favour of setting index.lifecycle.name dire…
colings86 Oct 24, 2018
e7fddb5
Adds usage data for ILM (#33377)
colings86 Oct 24, 2018
0b26f8b
Fixes NPE in multi node qa testt
colings86 Oct 25, 2018
21b9b02
fix PolicyStatsTests mutateInstance (#34835)
talevy Oct 25, 2018
41eaa58
remove index.lifecycle.skip setting (#34823)
talevy Oct 25, 2018
17fe37e
ILM Docs: update start/stop documentation (#34787)
talevy Oct 25, 2018
099baaf
HLRC: Split ILM request converters (#34759)
gwbrown Oct 25, 2018
3e70428
Merge remote-tracking branch 'origin/master' into index-lifecycle
dakrone Oct 25, 2018
a4b634e
Remove unnecessary "acknowledge: true" statements in REST tests
dakrone Oct 25, 2018
810cd46
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 25, 2018
f76ced4
update updating-policy docs (#34661)
talevy Oct 25, 2018
f6ce935
fix `GET _ilm` response with uninitialized ILM metadata (#34881)
talevy Oct 25, 2018
4c4afef
fix PolicyStatsTests: mutate kept same indicesManaged
talevy Oct 25, 2018
6880e2a
[TEST] Fix RolloverActionTests.mutateInstance
dakrone Oct 26, 2018
e737ea7
remove old doc placeholder and migrate ilm docs to top-level (#34615)
talevy Oct 26, 2018
d8322ca
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 26, 2018
8ce31f6
[ILM] Convert Explain request to new HLRC classes (#34922)
gwbrown Oct 26, 2018
5c88356
add ILM rolling upgrade tests (#32828)
talevy Oct 26, 2018
f6ac0e4
[ILM] Fix Move To Step API causing ILM to hang (#34618)
gwbrown Oct 29, 2018
c9e4d26
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 29, 2018
6cf7f12
Revert "add ILM rolling upgrade tests (#32828)"
talevy Oct 30, 2018
18c72e8
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 30, 2018
6ecb8ff
Move to Error step if ClusterState* steps throw (#35069)
gwbrown Oct 30, 2018
f5323cd
rename ILM Phase "minimum_age" to "min_age" (#35058)
talevy Oct 30, 2018
5141084
rename CRUD api REST path prefix _ilm to _ilm/policy (#35056)
talevy Oct 30, 2018
fdb0db3
throw exception when ilm-rollover-step runs on index without rollover…
talevy Oct 30, 2018
e540abd
[DOCS] Fixed edit links for ILM APIs and added the APIs to the REST r…
debadair Oct 31, 2018
d5d2842
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Oct 31, 2018
a294a7c
fix IndexLifecycleService setting member
talevy Oct 31, 2018
5f4b23f
cleanup ILM qa structure (#35110)
talevy Oct 31, 2018
f8e23f6
update ILM integ test cluster poll interval to 1s (#35113)
talevy Nov 1, 2018
c3cf7dd
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Nov 1, 2018
6b312a5
uninherit from AbstractComponent in IndexLifecycleService
talevy Nov 1, 2018
c6c0142
Merge remote-tracking branch 'upstream/master' into index-lifecycle
talevy Nov 1, 2018
b260406
ILM: use node _id attribute when allocating to one node (#35061)
talevy Nov 1, 2018
fc6e1f7
Merge branch 'master' into index-lifecycle
colings86 Nov 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .ci/java-versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ES_BUILD_JAVA=java11
ES_RUNTIME_JAVA=java8
GRADLE_TASK=build

GRADLE_EXTRA_ARGS=-Dtests.bwc.refspec=elastic/index-lifecycle-6.x

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package org.elasticsearch.client;

import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.elasticsearch.client.indexlifecycle.DeleteLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.ExplainLifecycleRequest;
import org.elasticsearch.client.indexlifecycle.GetLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.LifecycleManagementStatusRequest;
import org.elasticsearch.client.indexlifecycle.PutLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.RemoveIndexLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.RetryLifecyclePolicyRequest;
import org.elasticsearch.client.indexlifecycle.StartILMRequest;
import org.elasticsearch.client.indexlifecycle.StopILMRequest;
import org.elasticsearch.common.Strings;

import java.io.IOException;

final class IndexLifecycleRequestConverters {

private IndexLifecycleRequestConverters() {}

static Request getLifecyclePolicy(GetLifecyclePolicyRequest getLifecyclePolicyRequest) {
String endpoint = new RequestConverters.EndpointBuilder().addPathPartAsIs("_ilm/policy")
.addCommaSeparatedPathParts(getLifecyclePolicyRequest.getPolicyNames()).build();
Request request = new Request(HttpGet.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(getLifecyclePolicyRequest.masterNodeTimeout());
params.withTimeout(getLifecyclePolicyRequest.timeout());
return request;
}

static Request putLifecyclePolicy(PutLifecyclePolicyRequest putLifecycleRequest) throws IOException {
String endpoint = new RequestConverters.EndpointBuilder()
.addPathPartAsIs("_ilm/policy")
.addPathPartAsIs(putLifecycleRequest.getName())
.build();
Request request = new Request(HttpPut.METHOD_NAME, endpoint);
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(putLifecycleRequest.masterNodeTimeout());
params.withTimeout(putLifecycleRequest.timeout());
request.setEntity(RequestConverters.createEntity(putLifecycleRequest, RequestConverters.REQUEST_BODY_CONTENT_TYPE));
return request;
}

static Request deleteLifecyclePolicy(DeleteLifecyclePolicyRequest deleteLifecyclePolicyRequest) {
Request request = new Request(HttpDelete.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addPathPartAsIs("_ilm/policy")
.addPathPartAsIs(deleteLifecyclePolicyRequest.getLifecyclePolicy())
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(deleteLifecyclePolicyRequest.masterNodeTimeout());
params.withTimeout(deleteLifecyclePolicyRequest.timeout());
return request;
}

static Request removeIndexLifecyclePolicy(RemoveIndexLifecyclePolicyRequest removePolicyRequest) {
String[] indices = removePolicyRequest.indices() == null ?
Strings.EMPTY_ARRAY : removePolicyRequest.indices().toArray(new String[] {});
Request request = new Request(HttpDelete.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addCommaSeparatedPathParts(indices)
.addPathPartAsIs("_ilm")
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withIndicesOptions(removePolicyRequest.indicesOptions());
params.withMasterTimeout(removePolicyRequest.masterNodeTimeout());
return request;
}

static Request startILM(StartILMRequest startILMRequest) {
Request request = new Request(HttpPost.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addPathPartAsIs("_ilm")
.addPathPartAsIs("start")
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(startILMRequest.masterNodeTimeout());
params.withTimeout(startILMRequest.timeout());
return request;
}

static Request stopILM(StopILMRequest stopILMRequest) {
Request request = new Request(HttpPost.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addPathPartAsIs("_ilm")
.addPathPartAsIs("stop")
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(stopILMRequest.masterNodeTimeout());
params.withTimeout(stopILMRequest.timeout());
return request;
}

static Request lifecycleManagementStatus(LifecycleManagementStatusRequest lifecycleManagementStatusRequest){
Request request = new Request(HttpGet.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addPathPartAsIs("_ilm")
.addPathPartAsIs("status")
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(lifecycleManagementStatusRequest.masterNodeTimeout());
params.withTimeout(lifecycleManagementStatusRequest.timeout());
return request;
}

static Request explainLifecycle(ExplainLifecycleRequest explainLifecycleRequest) {
String[] indices = explainLifecycleRequest.indices() == null ? Strings.EMPTY_ARRAY : explainLifecycleRequest.indices();
Request request = new Request(HttpGet.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addCommaSeparatedPathParts(indices)
.addPathPartAsIs("_ilm")
.addPathPartAsIs("explain")
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withIndicesOptions(explainLifecycleRequest.indicesOptions());
params.withMasterTimeout(explainLifecycleRequest.masterNodeTimeout());
return request;
}

static Request retryLifecycle(RetryLifecyclePolicyRequest retryLifecyclePolicyRequest) {
Request request = new Request(HttpPost.METHOD_NAME,
new RequestConverters.EndpointBuilder()
.addCommaSeparatedPathParts(retryLifecyclePolicyRequest.getIndices())
.addPathPartAsIs("_ilm")
.addPathPartAsIs("retry")
.build());
RequestConverters.Params params = new RequestConverters.Params(request);
params.withMasterTimeout(retryLifecyclePolicyRequest.masterNodeTimeout());
params.withTimeout(retryLifecyclePolicyRequest.timeout());
return request;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Locale;
import java.util.StringJoiner;

Expand Down Expand Up @@ -1007,7 +1008,12 @@ EndpointBuilder addCommaSeparatedPathParts(String[] parts) {
return this;
}

EndpointBuilder addPathPartAsIs(String... parts) {
EndpointBuilder addCommaSeparatedPathParts(List<String> parts) {
addPathPart(String.join(",", parts));
return this;
}

EndpointBuilder addPathPartAsIs(String ... parts) {
for (String part : parts) {
if (Strings.hasLength(part)) {
joiner.add(part);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public class RestHighLevelClient implements Closeable {
private final MigrationClient migrationClient = new MigrationClient(this);
private final MachineLearningClient machineLearningClient = new MachineLearningClient(this);
private final SecurityClient securityClient = new SecurityClient(this);
private final IndexLifecycleClient ilmClient = new IndexLifecycleClient(this);
private final RollupClient rollupClient = new RollupClient(this);

/**
Expand Down Expand Up @@ -370,6 +371,17 @@ public final XPackClient xpack() {
*/
public LicenseClient license() { return licenseClient; }

/**
* A wrapper for the {@link RestHighLevelClient} that provides methods for
* accessing the Elastic Index Lifecycle APIs.
* <p>
* See the <a href="http://FILL-ME-IN-WE-HAVE-NO-DOCS-YET.com"> X-Pack APIs
* on elastic.co</a> for more information.
*/
public IndexLifecycleClient indexLifecycle() {
return ilmClient;
}

/**
* Provides methods for accessing the Elastic Licensed Licensing APIs that
* are shipped with the default distribution of Elasticsearch. All of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* Please note, any requests that use a ackTimeout should set timeout as they
* represent the same backing field on the server.
*/
public class TimedRequest implements Validatable {
public abstract class TimedRequest implements Validatable {

public static final TimeValue DEFAULT_ACK_TIMEOUT = timeValueSeconds(30);
public static final TimeValue DEFAULT_MASTER_NODE_TIMEOUT = TimeValue.timeValueSeconds(30);
Expand All @@ -38,7 +38,6 @@ public class TimedRequest implements Validatable {

public void setTimeout(TimeValue timeout) {
this.timeout = timeout;

}

public void setMasterTimeout(TimeValue masterTimeout) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.client.indexlifecycle;

import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.ToXContentObject;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;

import java.io.IOException;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;

public class AllocateAction implements LifecycleAction, ToXContentObject {

public static final String NAME = "allocate";
static final ParseField NUMBER_OF_REPLICAS_FIELD = new ParseField("number_of_replicas");
static final ParseField INCLUDE_FIELD = new ParseField("include");
static final ParseField EXCLUDE_FIELD = new ParseField("exclude");
static final ParseField REQUIRE_FIELD = new ParseField("require");

@SuppressWarnings("unchecked")
private static final ConstructingObjectParser<AllocateAction, Void> PARSER = new ConstructingObjectParser<>(NAME,
a -> new AllocateAction((Integer) a[0], (Map<String, String>) a[1], (Map<String, String>) a[2], (Map<String, String>) a[3]));

static {
PARSER.declareInt(ConstructingObjectParser.optionalConstructorArg(), NUMBER_OF_REPLICAS_FIELD);
PARSER.declareObject(ConstructingObjectParser.optionalConstructorArg(), (p, c) -> p.mapStrings(), INCLUDE_FIELD);
PARSER.declareObject(ConstructingObjectParser.optionalConstructorArg(), (p, c) -> p.mapStrings(), EXCLUDE_FIELD);
PARSER.declareObject(ConstructingObjectParser.optionalConstructorArg(), (p, c) -> p.mapStrings(), REQUIRE_FIELD);
}

private final Integer numberOfReplicas;
private final Map<String, String> include;
private final Map<String, String> exclude;
private final Map<String, String> require;

public static AllocateAction parse(XContentParser parser) {
return PARSER.apply(parser, null);
}

public AllocateAction(Integer numberOfReplicas, Map<String, String> include, Map<String, String> exclude, Map<String, String> require) {
if (include == null) {
this.include = Collections.emptyMap();
} else {
this.include = include;
}
if (exclude == null) {
this.exclude = Collections.emptyMap();
} else {
this.exclude = exclude;
}
if (require == null) {
this.require = Collections.emptyMap();
} else {
this.require = require;
}
if (this.include.isEmpty() && this.exclude.isEmpty() && this.require.isEmpty() && numberOfReplicas == null) {
throw new IllegalArgumentException(
"At least one of " + INCLUDE_FIELD.getPreferredName() + ", " + EXCLUDE_FIELD.getPreferredName() + " or "
+ REQUIRE_FIELD.getPreferredName() + "must contain attributes for action " + NAME);
}
if (numberOfReplicas != null && numberOfReplicas < 0) {
throw new IllegalArgumentException("[" + NUMBER_OF_REPLICAS_FIELD.getPreferredName() + "] must be >= 0");
}
this.numberOfReplicas = numberOfReplicas;
}

public Integer getNumberOfReplicas() {
return numberOfReplicas;
}

public Map<String, String> getInclude() {
return include;
}

public Map<String, String> getExclude() {
return exclude;
}

public Map<String, String> getRequire() {
return require;
}

@Override
public String getName() {
return NAME;
}

@Override
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException {
builder.startObject();
if (numberOfReplicas != null) {
builder.field(NUMBER_OF_REPLICAS_FIELD.getPreferredName(), numberOfReplicas);
}
builder.field(INCLUDE_FIELD.getPreferredName(), include);
builder.field(EXCLUDE_FIELD.getPreferredName(), exclude);
builder.field(REQUIRE_FIELD.getPreferredName(), require);
builder.endObject();
return builder;
}

@Override
public int hashCode() {
return Objects.hash(numberOfReplicas, include, exclude, require);
}

@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj.getClass() != getClass()) {
return false;
}
AllocateAction other = (AllocateAction) obj;
return Objects.equals(numberOfReplicas, other.numberOfReplicas) &&
Objects.equals(include, other.include) &&
Objects.equals(exclude, other.exclude) &&
Objects.equals(require, other.require);
}

@Override
public String toString() {
return Strings.toString(this);
}
}
Loading