Skip to content

Conversation

@Gargi-jais11
Copy link
Contributor

@Gargi-jais11 Gargi-jais11 commented Mar 5, 2025

What changes were proposed in this pull request?

As the status helps to reveal the disk balancer task state to user, add success move count and fail move count to status report.

What is the link to the Apache JIRA

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

How was this patch tested?

The patch was tested manually on docker cluster by checking diskbalancer status command.

bash-5.1$ ozone admin datanode diskbalancer status
Status result:
Datanode                                 VolumeDensity        Status     Threshold(%) BandwidthInMB   Threads         SuccessMove     FailureMove    
ozone-datanode-1.ozone_default           0.010688673650023704 RUNNING    0.0002       10              5               2               0              
ozone-datanode-2.ozone_default           0.02164608881687885  RUNNING    0.0002       10              5               3               0              
           

@Gargi-jais11 Gargi-jais11 marked this pull request as ready for review March 5, 2025 11:58
Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

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

lgtm

@Gargi-jais11 Gargi-jais11 requested a review from ChenSammi March 10, 2025 14:00

DiskBalancerStatus status = statusMap.get(dn);
if (status == null) {
status = new DiskBalancerStatus(false, new DiskBalancerConfiguration(), 0, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

@Gargi-jais11 , please refactor this DiskBalancerStatus, as DiskBalancerRunningStatus has three state, not just ture and false, let's try changing the DiskBalancerStatus#isRunning from boolean to HddsProtos.DiskBalancerRunningStatus.

After the refactor, getRunningStatus() can be simply replaced with DiskBalancerStatus#getRunningStatus.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, please update the above console output of "ozone admin datanode diskbalancer status" command with new example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

@ChenSammi ChenSammi merged commit 87ad327 into apache:HDDS-5713 Mar 11, 2025
43 checks passed
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.

3 participants