Uh oh!
There was an error while loading. Please reload this page.
HDDS-15082. Add User facing Config Contract for ozone local - #10147
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an internal ozone local CLI surface and supporting configuration objects to define a user-facing configuration contract for spinning up a local single-node Ozone cluster.
Changes:
- Introduces
OzoneLocal(hidden) CLI withrunsubcommand and env/CLI-based config resolution intoLocalOzoneClusterConfig. - Adds
LocalOzoneClusterConfigandLocalOzoneRuntimeas the local runtime contract/config model. - Adds unit tests covering command metadata/help visibility and config parsing/precedence/validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/OzoneLocal.java | New internal CLI entry point and config resolution logic from flags/env vars. |
| hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/LocalOzoneClusterConfig.java | New config model + builder + FormatMode parsing for user-facing values. |
| hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/LocalOzoneRuntime.java | New runtime interface contract for local single-node runtimes. |
| hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/package-info.java | New package documentation for the local runtime support package. |
| hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/local/TestOzoneLocal.java | Tests for CLI metadata, help behavior, and env/CLI precedence + validation errors. |
| hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/local/TestLocalOzoneClusterConfig.java | Tests for builder defaults/overrides and FormatMode parsing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| public static FormatMode fromString(String value) { | ||
| String normalized = value.trim().toUpperCase(Locale.ROOT) | ||
| .replace('-', '_'); | ||
| return valueOf(normalized); | ||
| } |
| @Override | ||
| public Void call() { | ||
| resolveConfig(new OzoneConfiguration()); | ||
| return null; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
peterxcli
commented
Apr 28, 2026
@henrybear327 please merge upstream master, thanks! |
peterxcli
commented
May 2, 2026
feel free to request me to for review if you think this is ready, thanks! |
chungen0126
commented
May 5, 2026
Thanks @henrybear327 for the patch. Please consider leveraging PicoCLI's built-in environment variable support (e.g., @option(..., defaultValue = "${env:OZONE_LOCAL_DATANODES:-1}")). This automatically handles type binding and validation for us, which could help remove a lot of boilerplate code in resolveConfig. It might keep the code much cleaner and simpler. See https://picocli.info/#_variables_in_default_values. |
3d6102a to
63b3817Comparehenrybear327
commented
May 10, 2026
Thank you for the feedback! Addressed in the latest commit. |
henrybear327
commented
May 10, 2026
Hi @peterxcli, PTAL :) Thank you! |
ozone localUh oh!
There was an error while loading. Please reload this page.
peterxcli
commented
May 11, 2026
Thanks @henrybear327 for the patch, @chungen0126 for the review! |
henrybear327
commented
May 11, 2026
Thanks @peterxcli and @chungen0126 for the review! |
What changes were proposed in this pull request?
Introduce user-facing paremeters for local ozone cluster spin up.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15082
How was this patch tested?
Unit tests.