-
Notifications
You must be signed in to change notification settings - Fork 620
HDDS-2413. Set configuration variables from annotated java objects #1106
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
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f630533
HDDS-2413. Set configuration variables from annotated java objects
adoroszlai 2f6d9f3
trigger new CI check
adoroszlai b2efa08
HDDS-2413. Extract ConfigurationTarget interface
adoroszlai 10b1901
HDDS-2413. Helper method for config object creation
adoroszlai 12511c4
HDDS-2413. Remove useless config object creation
adoroszlai 32f5fdd
HDDS-2413. Use type-safe DatanodeRatisServerConfig for test settings
adoroszlai a5a259b
HDDS-2413. Use type-safe ReconSqlDbConfig in tests
adoroszlai 250f358
HDDS-2413. Get rid of unnecessary OzoneConfiguration.of
adoroszlai 573868d
HDDS-2413. Use type-safe RocksDBConfiguration in tests
adoroszlai ee3d1f7
HDDS-2413. Use type-safe ReplicationManagerConfiguration in tests
adoroszlai badac1d
HDDS-2413. Use type-safe ReconTaskConfig in tests
adoroszlai 0c9c5a6
Merge remote-tracking branch 'origin/master' into HDDS-2413
adoroszlai 8b997f2
Merge remote-tracking branch 'origin/master' into HDDS-2413
adoroszlai 809a1e2
HDDS-2413. One more instance of DatanodeRatisServerConfig
adoroszlai 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
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
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.
I really don't like the approach when the current port number (after using :0) is added to the configuration. It's easier if the configuration is immutable after loading.
I understand that the immutable is not possible with this injection and I accept that it's necessary.
One possible approach is to introduce two interfaces:
ConfigSource(read-only) andConfigDestination(write only).OzoneConfigurationcan implement both. But there could be a specificConfigSource(eg.EnvironmentVariableConfigSource) which would be read only.But I am fine with committing this patch as is, but interested about opinion.
Also: it seems to be useful for testing to introduce an
OzoneConfiguration.fromAnnotatedObject()method.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.
Thanks @elek for the suggestion. I was considering this, but needed this nudge to implement it.
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.
Oh, I see why. It makes the patch bigger because we use this dirty hack to store the port in the config.