Skip to content

Conversation

@adoroszlai
Copy link
Contributor

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

@adoroszlai adoroszlai self-assigned this Dec 8, 2025
@adoroszlai adoroszlai requested a review from smengcl December 8, 2025 19:25
@adoroszlai adoroszlai marked this pull request as draft December 15, 2025 11:02
@adoroszlai
Copy link
Contributor Author

Marked as draft to force new CI run even if this is approved. We need to verify if any new config keys added on master in the meantime are valid wrt. this requirement.

@adoroszlai
Copy link
Contributor Author

@smengcl please take a look

@adoroszlai adoroszlai marked this pull request as ready for review January 7, 2026 21:32
@adoroszlai adoroszlai requested a review from sodonnel January 8, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant