Skip to content

HDDS-15081. Add Internal Scaffold#10146

Merged
peterxcli merged 1 commit intoapache:masterfrom
henrybear327:HDDS-15081
Apr 28, 2026
Merged

HDDS-15081. Add Internal Scaffold#10146
peterxcli merged 1 commit intoapache:masterfrom
henrybear327:HDDS-15081

Conversation

@henrybear327
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Introduce ozone local command skeleton.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15081

How was this patch tested?

With unit test.

@henrybear327 henrybear327 changed the title HDDS-15081. Add hidden Ozone local scaffold HDDS-15081. Add Internal Scaffold Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces an internal, hidden ozone local CLI scaffold to support future local single-node Ozone runtime commands.

Changes:

  • Adds OzoneLocal CLI entrypoint with a hidden run placeholder subcommand.
  • Introduces a LocalOzoneRuntime interface defining the local runtime contract.
  • Adds unit tests verifying picocli metadata and help output behavior for the new command.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/OzoneLocal.java Adds the hidden ozone local command skeleton and hidden run placeholder subcommand.
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/LocalOzoneRuntime.java Defines a runtime contract interface for future local single-node runtime implementations.
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/local/package-info.java Introduces package-level documentation for the new org.apache.hadoop.ozone.local package.
hadoop-ozone/tools/src/test/java/org/apache/hadoop/ozone/local/TestOzoneLocal.java Adds unit tests for command metadata, subcommand registration, and help output hiding behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +77 to +79
assertEquals(0, exitCode);
assertTrue(help.contains("Usage: ozone local"));
assertFalse(help.contains("run"));
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The assertion assertFalse(help.contains("run")) is fairly broad and can become brittle if the root help text later includes the substring "run" for unrelated reasons (eg, wording like "running" / "runtime" in a description or option). Consider tightening this to check for a subcommand listing entry (eg, a line/section that specifically enumerates subcommands) or asserting via picocli metadata that the hidden subcommand is not rendered in the usage output.

Suggested change
assertEquals(0, exitCode);
assertTrue(help.contains("Usage: ozone local"));
assertFalse(help.contains("run"));
boolean runSubcommandListed = help.lines()
.map(String::stripLeading)
.anyMatch(line -> line.equals("run")
|| line.startsWith("run ")
|| line.startsWith("run\t"));
assertEquals(0, exitCode);
assertTrue(help.contains("Usage: ozone local"));
assertFalse(runSubcommandListed);

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@peterxcli peterxcli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ivandika3 ivandika3 added the ozone-local HDDS-14893 label Apr 28, 2026
@peterxcli peterxcli merged commit d85b05a into apache:master Apr 28, 2026
91 of 93 checks passed
@peterxcli
Copy link
Copy Markdown
Member

Thanks @henrybear327 for the patch, @ivandika3 for creating the label!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ozone-local HDDS-14893

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants