adoroszlai opened a new pull request, #9463: URL: https://github.com/apache/ozone/pull/9463
## What changes were proposed in this pull request? After HDDS-12424, `ConfigGroup#prefix` can now be included in `Config#key`, which helps when searching by full config property name. Some new keys were added recently with prefix included. HDDS-14030 added the prefix in all existing config keys to ensure consistent style. This change proposes to make the prefix mandatory so that we: - keep this consistent style in future - avoid typos For that, we need to remove support for inheriting configuration keys from ancestor classes. In theory this feature would help reuse, applying different prefixes to different subclasses of the same base one. However, this is currently used only in mock configuration classes, which exist for testing the configuration framework. I think descriptions, tags and maybe even default values would need to be different across subclasses, so it does not seem very practical. We can still inherit some implementation for reuse and apply the `@Config` annotation in the subclass. Config keys are validated against the prefix at compile time. Sample error when prefix is missing: ``` [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] hadoop-hdds/config/src/test/java/org/apache/hadoop/hdds/conf/ConfigurationExample.java:[27,8] ozone.test.config. is not a prefix of config.time.duration [INFO] 1 error ``` https://issues.apache.org/jira/browse/HDDS-14105 ## How was this patch tested? CI: https://github.com/adoroszlai/ozone/actions/runs/20035584181 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
