HDDS-15306. Expose Disk Balancer CLI in top-level datanode help and improve usability#10312
HDDS-15306. Expose Disk Balancer CLI in top-level datanode help and improve usability#10312Gargi-jais11 wants to merge 6 commits into
Conversation
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.
|
@ChenSammi Please re-review, I have addressed all comments. |
|
@Gargi-jais11 , let's enable disk balancer by default in this patch too. |
|
@Gargi-jais11 , what's the CLI behavior if disk balancer is disabled? |
When DiskBalancer is disabled CLI is blocked and below output is seen: |
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:
When DiskBalancer is disabled CLI is blocked and below output is seen: