Skip to content

Conversation

@Gargi-jais11
Copy link
Contributor

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.

@Gargi-jais11 Gargi-jais11 marked this pull request as ready for review August 28, 2025 03:02
*/
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());
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Gargi Jaiswal added 6 commits September 26, 2025 16:41
…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
@ChenSammi
Copy link
Contributor

Thanks @Gargi-jais11 , the last patch looks good to me, +1.

@ChenSammi ChenSammi merged commit c00288a into apache:HDDS-5713 Oct 10, 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.

2 participants