-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-13611. [DiskBalancer] Inconsistent VolumeDataDensity calculations between SCM and DN and incorrect EstBytesToMove #8972
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
...ain/java/org/apache/hadoop/ozone/container/common/states/endpoint/HeartbeatEndpointTask.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/hadoop/ozone/container/diskbalancer/VolumeDataDensityCalculation.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/hadoop/ozone/container/diskbalancer/VolumeDataDensityCalculation.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DiskBalancerManager.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DiskBalancerManager.java
Outdated
Show resolved
Hide resolved
| */ | ||
| public static ImmutableList<HddsVolume> getImmutableVolumeSet(MutableVolumeSet volumeSet) { | ||
| // Create an immutable copy of the volume list at this point in time | ||
| List<HddsVolume> volumes = StorageVolumeUtil.getHddsVolumesList(volumeSet.getVolumesList()); |
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.
Can we use StorageVolume instead of HddsVolume? For getCurrentUsage() is available in StorageVolume.
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.
We cannot use StorageVolume instead of HddsVolume although getCurrentUsage() is available in StorageVolume but ** getCommittedBytes() ** is only available in HddsVolume which is needed for calculation.
...ervice/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerService.java
Outdated
Show resolved
Hide resolved
9756211 to
e48be9d
Compare
…sToMove with DefaultVolumeChoosingPolicy # Conflicts: # hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/endpoint/HeartbeatEndpointTask.java
…e calculation on DN side # Conflicts: # hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/MutableVolumeSet.java
96ead2f to
6026ffa
Compare
|
Thanks @Gargi-jais11 , the last patch looks good to me, +1. |
What changes were proposed in this pull request?
This ticket fixes inconsistencies in VolumeDataDensity calculations between SCM and DN causing misleading reports.
Although volumeDataDensity for the datanode is 0.0 still it is started and showing containers moved.
Estimated bytes moved and estimated time left is 0 although it is moving containers.
Proposed Solution:
VolumeDataDensity calculation (on SCM side in DiskBalancerManager ), EstimatedBytesToMove calculation should be aligned with DefaultVolumeChoosingPolicy calculation.{}
VolumeDataDensity calculation should be done on the DN side so that it considers all the ongoing operations and then correctly report it to the SCM.
And this VolumeDataDensity calculation should be standAlone utility on datanode side that can calculate VolumeDataDensity regardless of diskbalancer state (stopped or running) .
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13611
How was this patch tested?
passed existing test.