This repository was archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Explain all and Get all API #352
Merged
bowenlan-amzn
merged 11 commits into
opendistro-for-elasticsearch:master
from
bowenlan-amzn:explaingetall
Jan 27, 2021
Merged
Explain all and Get all API #352
bowenlan-amzn
merged 11 commits into
opendistro-for-elasticsearch:master
from
bowenlan-amzn:explaingetall
Jan 27, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #352 +/- ##
============================================
+ Coverage 76.72% 77.13% +0.40%
- Complexity 1460 1487 +27
============================================
Files 188 194 +6
Lines 7335 7552 +217
Branches 1190 1210 +20
============================================
+ Hits 5628 5825 +197
- Misses 1061 1071 +10
- Partials 646 656 +10
Continue to review full report at Codecov.
|
use SearchParams fix sort order problem of cluster state working on wildcard add enabled field
dbbaughe
reviewed
Dec 18, 2020
...amazon/opendistroforelasticsearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt
Outdated
Show resolved
Hide resolved
dbbaughe
reviewed
Dec 18, 2020
dbbaughe
reviewed
Dec 18, 2020
...pendistroforelasticsearch/indexmanagement/indexstatemanagement/model/ManagedIndexMetaData.kt
Outdated
Show resolved
Hide resolved
dbbaughe
reviewed
Dec 18, 2020
...relasticsearch/indexmanagement/indexstatemanagement/coordinator/ManagedIndexCoordinatorIT.kt
Show resolved
Hide resolved
fix tests after change
dbbaughe
reviewed
Dec 18, 2020
...csearch/indexmanagement/indexstatemanagement/transport/action/getpolicy/GetPoliciesAction.kt
Outdated
Show resolved
Hide resolved
dbbaughe
reviewed
Dec 18, 2020
...pendistroforelasticsearch/indexmanagement/indexstatemanagement/model/ManagedIndexMetaData.kt
Outdated
Show resolved
Hide resolved
lezzago
reviewed
Jan 23, 2021
...lasticsearch/indexmanagement/indexstatemanagement/transport/action/explain/ExplainRequest.kt
Show resolved
Hide resolved
dbbaughe
reviewed
Jan 27, 2021
...earch/indexmanagement/indexstatemanagement/transport/action/getpolicy/GetPoliciesResponse.kt
Outdated
Show resolved
Hide resolved
Contributor
|
Can you add example request/responses to the PR description? Want to see what they look like; try adding different examples, e.g. of no indices (all), multiple indices, wildcards etc. |
total_managed_indices bug fix: when query size = 0 still show total managed indices
dbbaughe
approved these changes
Jan 27, 2021
lezzago
approved these changes
Jan 27, 2021
Closed
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#292
Description of changes:
Explain and Get Policy API now support get all functionality, to use it, just don't give any specific query object, directly call GET
_opendistro/_ism/explainor_opendistro/_ism/policies, then you can retrieve all managed indices or all policies.Such get all API can have several query parameters, for example:
GET _opendistro/_ism/policies?from=0&size=20&sortOrder=desc&sortField=policy.last_updated_time&queryString=p*Transport action name of get all policies API is
cluster:admin/opendistro/ism/policy/searchto be consistent with ODFE permission names
Testing
The IT for Get all policies and Explain All are in
IndexStateManagementRestApiIT.ktandRestExplainActionIT.ktBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Example req and res
GET _opendistro/_ism/policiesGET _opendistro/_ism/explainGET _opendistro/_ism/explain/testindex1,wildindexGET _opendistro/_ism/explain/test*GET _opendistro/_ism/explain?queryString=test*total managed indices is determined by search response, according to previous logic