-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Adding settings to data streams #126947
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
masseyke
merged 25 commits into
elastic:main
from
masseyke:adding-settings-to-data-streams
Apr 23, 2025
Merged
Adding settings to data streams #126947
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
e93ea67
Adding settings to data streams
masseyke cf2b2c2
removing unused method
masseyke bec18b3
fixing ProjectMetadataTests
masseyke 9cb64f2
removing invalid MetadataTests tests
masseyke 781f9c6
[CI] Auto commit changes from spotless
7432824
adding a unit test
masseyke 73ff2a1
merging main
masseyke 925f01b
Merge branch 'adding-settings-to-data-streams' of github.com:masseyke…
masseyke c7ffd3e
Adding back a constructor that serverless depends on
masseyke 083a437
merging main
masseyke c6398d6
Merge branch 'main' into adding-settings-to-data-streams
masseyke 0fda41e
merging main
masseyke 9d09df7
making getEffectiveSettings more robust
masseyke b98d4a8
merging main
masseyke 39e41c0
merging main
masseyke a39ffbc
moving merge methods out of DataStream
masseyke 3cf1def
merging main
masseyke d85b4d7
updates to Settings::merge from code review
masseyke ad9238e
merging main
masseyke 5df3d4f
splitting up unit tests for code review
masseyke a9998f5
fixing Settings::merge
masseyke 641c645
removing support for null settings from ComposableIndexTemplate::merg…
masseyke 8d7875d
Merge branch 'main' into adding-settings-to-data-streams
masseyke b1d5944
Merge branch 'main' into adding-settings-to-data-streams
masseyke 3521f8e
Merge branch 'main' into adding-settings-to-data-streams
masseyke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -876,6 +876,30 @@ public Set<String> keySet() { | |
| return newKeySet; | ||
| } | ||
|
|
||
| /* | ||
| * This method merges the given newSettings into this Settings, returning either a new Settings object or | ||
| * this if the newSettings are null or empty. If any values are null in newSettings, those keys are removed | ||
| * from the returned object. | ||
| */ | ||
| public Settings merge(Settings newSettings) { | ||
| Objects.requireNonNull(newSettings); | ||
| if (Settings.EMPTY.equals(newSettings)) { | ||
| return this; | ||
| } | ||
| Settings.Builder builder = Settings.builder().put(this).put(newSettings); | ||
|
||
| for (String key : newSettings.keySet()) { | ||
| String rawValue = newSettings.get(key); | ||
| if (builder.get(key) == null) { | ||
| if (rawValue == null) { | ||
| builder.remove(key); | ||
| } else { | ||
| builder.put(key, rawValue); | ||
| } | ||
| } | ||
| } | ||
| return builder.build(); | ||
| } | ||
|
|
||
| /** | ||
| * A builder allowing to put different settings and then {@link #build()} an immutable | ||
| * settings implementation. Use {@link Settings#builder()} in order to | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: null could also be removed here?