-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-12437. [DiskBalancer] Estimate the total size pending to move before disk usage becomes even #8056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…fore disk usage becomes even # Conflicts: # hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerInfo.java # hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java # hadoop-hdds/interface-client/src/main/proto/hdds.proto # hadoop-hdds/interface-server/src/main/proto/ScmServerDatanodeHeartbeatProtocol.proto # hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DiskBalancerManager.java # hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerStatusSubcommand.java
…fore disk usage becomes even
263978d to
8b0a503
Compare
...ervice/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java
Outdated
Show resolved
Hide resolved
...ools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerStatusSubcommand.java
Outdated
Show resolved
Hide resolved
...ools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerStatusSubcommand.java
Outdated
Show resolved
Hide resolved
...ools/src/main/java/org/apache/hadoop/hdds/scm/cli/datanode/DiskBalancerStatusSubcommand.java
Outdated
Show resolved
Hide resolved
|
@Gargi-jais11 , let's show EstBytesToMove(MB) together with the estimation time. And add a note at the command final, explain that estimation time is calculated based on estimation bytes to move and bandwidth. |
Sure will do the above mentioned changes |
...ce/src/test/java/org/apache/hadoop/ozone/container/diskbalancer/TestDiskBalancerService.java
Outdated
Show resolved
Hide resolved
| getDiskBalancerService(containerSet, conf, keyValueHandler, null, 1); | ||
| svc.setShouldRun(true); | ||
| svc.setThreshold(10); | ||
| svc.setQueueSize(2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why hard code the queue size to 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because if I don't hard code the queue size than when it checks the actual value of bytesToMove through calculateBytesToMove then everytime the queue size is 0 as for checking the queue size getTask is not called and when I was trying to call it then containerChoosingPolicy was throwing lots of errors to just check whether the calculateBytesToMove I did it hardcode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can pass the volumeSet and OzoneConfiguration to calculateBytesToMove() and make it public, so that you can directly call calculateBytesToMove from the unit test, and don't have to deal with the containerChoosingPolicy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried passing the volumeSet and OzoneConfiguration to calculateBytesToMove() without hard coding the queue size to 2 or as volume count but the bytesToMove is still returning to be 0 due to queuesize = 0 else after refactoring the unit test as you suggested on hard coding the queue size to 2 all test case are passing
...ce/src/test/java/org/apache/hadoop/ozone/container/diskbalancer/TestDiskBalancerService.java
Outdated
Show resolved
Hide resolved
|
Please also update the console output. |
done |
955dfbe to
a24ced7
Compare
|
Thanks @Gargi-jais11 . |
What changes were proposed in this pull request?
It will be an estimation value, due to there are other activities going on, such as block deletion, new container creation, container replica deletion, new data ingestion.
This value will be an indicator for roughly how much time are still needed for the disk usage to become even.
Should Include this value in status report too.
The estimated time pending before disk usage become even is given for the happy path in status report.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12437
How was this patch tested?
Unit Test is written for the function in
testDiskBalancerService#testCalculateBytesToMove.Tested it manually by running locally on docker-cluster.