HDDS-15306. Expose Disk Balancer CLI in top-level datanode help and improve usability#10312
Open
Gargi-jais11 wants to merge 2 commits into
Open
HDDS-15306. Expose Disk Balancer CLI in top-level datanode help and improve usability#10312Gargi-jais11 wants to merge 2 commits into
Gargi-jais11 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves DiskBalancer CLI discoverability and output usability by exposing the diskbalancer command in top-level datanode help, enhancing stdin-related help text, and changing the diskbalancer report output to show percentages/rounded values and additional per-volume fields.
Changes:
- Unhide
ozone admin datanode diskbalancerand improve CLI help text for reading datanode addresses from stdin (-). - Update diskbalancer report output to show selected ratios as percentages (2 decimals) and rename/add per-volume capacity/usage fields (including
ozoneAvailable). - Update protobuf schema and tests to reflect the new per-volume report fields.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| hadoop-ozone/cli-admin/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestDiskBalancerSubCommands.java | Updates JSON-output assertions and report-proto generation to include the renamed/new per-volume fields. |
| hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerReportSubcommand.java | Formats report ratios as percent strings, renames/adds reported columns/JSON keys, and adds explanatory notes. |
| hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerCommands.java | Exposes the diskbalancer command in top-level datanode CLI help and updates description text. |
| hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DatanodeParameters.java | Improves help text explaining stdin usage termination and examples for -. |
| hadoop-hdds/interface-client/src/main/proto/hdds.proto | Renames/adds fields in VolumeReportProto for ozone capacity/available/used. |
| hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/diskbalancer/TestDiskBalancerProtocolServer.java | Updates protocol server tests for the new VolumeReportProto fields. |
| hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java | Populates the updated VolumeReportProto fields when building volume reports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@ChenSammi Please re-review, I have addressed all comments. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes were proposed in this pull request?
Utilization | VolumeDensity should be in percentage form.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15306
How was this patch tested?
Tested manually:
Before Fix:
After Fix: