Refactor export and idxmgmt handling.#11777
Merged
simitt merged 13 commits intoelastic:masterfrom Apr 23, 2019
Merged
Conversation
Change idxmgmt handling to work with esClient and stdoutClient, and change supporter interface for more flexibility. Refactor export cmds to reuse some logic.
houndci-bot
reviewed
Apr 12, 2019
houndci-bot
reviewed
Apr 12, 2019
urso
reviewed
Apr 12, 2019
4 tasks
2 tasks
Contributor
Author
|
@urso this is ready for another round of review. |
urso
reviewed
Apr 16, 2019
houndci-bot
reviewed
Apr 16, 2019
houndci-bot
reviewed
Apr 16, 2019
houndci-bot
reviewed
Apr 16, 2019
houndci-bot
reviewed
Apr 16, 2019
urso
reviewed
Apr 16, 2019
urso
reviewed
Apr 16, 2019
urso
reviewed
Apr 16, 2019
urso
reviewed
Apr 16, 2019
urso
reviewed
Apr 16, 2019
| genTemplateConfigCmd.Flags().String("es.version", settings.Version, "Elasticsearch version") | ||
| genTemplateConfigCmd.Flags().String("index", settings.IndexPrefix, "Base index name") | ||
| genTemplateConfigCmd.Flags().Bool("noilm", false, "Generate template with ILM disabled") | ||
| genTemplateConfigCmd.Flags().String("dir", "", "Specify directory for printing template files. By default templates are printed to stdout.") |
There was a problem hiding this comment.
nice. Makes me wonder if it would make sense to have this as a positional parameter instead of a CLI flag. E.g. what happens when we introduce multiple templates support, where to write to if no dir is given?
Contributor
Author
There was a problem hiding this comment.
If no dir is given, we write to stdout.
urso
reviewed
Apr 16, 2019
urso
reviewed
Apr 16, 2019
|
Jenkins, please test this. |
|
Jenkins, test this. |
urso
approved these changes
Apr 18, 2019
Contributor
Author
|
jenkins, test this. |
6 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
At the moment one
idxmgmt.Supporterand oneilm.Supportercan be defined for one beat, with the following interfaces:idxmgmt.Supporter:
ilm.Supporter and ilm.Manager:
Using these interfaces as is does not allow for having multiple templates nor multiple ILM policies for one beat. This is a requirement for APM though.
During some discussion with @urso we agreed on moving forward by allowing for having multiple ILM supporter per idxmgmt supporter, and abstracting away the template handling. This can be achieved by removing following from the
idxmgmt.Supporterinterface:The main changes arising from this is related to the
exportcommands, as they were using those methods.Therefore this PR addresses two main points:
idxmgmt.Supporterto allow for multiple ilm supporter and more flexible template handlingexport templateandexport ilm-policycmds and refactorexportpackage to reuse and align more logic. Exporting templates and ilm-policy also allows to specify a--diroption now so one can write them to a file in a specified directory.TODO: