Gargi-jais11 commented on code in PR #9068:
URL: https://github.com/apache/ozone/pull/9068#discussion_r2425658035
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/policy/DefaultContainerChoosingPolicy.java:
##########
@@ -49,31 +51,70 @@ public class DefaultContainerChoosingPolicy implements
ContainerChoosingPolicy {
@Override
public ContainerData chooseContainer(OzoneContainer ozoneContainer,
- HddsVolume hddsVolume, Set<ContainerID> inProgressContainerIDs) {
+ HddsVolume srcVolume, HddsVolume destVolume,
+ Set<ContainerID> inProgressContainerIDs,
+ Double threshold, MutableVolumeSet volumeSet) {
Iterator<Container<?>> itr;
try {
- itr = CACHE.get().get(hddsVolume,
- () -> ozoneContainer.getController().getContainers(hddsVolume));
+ itr = CACHE.get().get(srcVolume,
+ () -> ozoneContainer.getController().getContainers(srcVolume));
} catch (ExecutionException e) {
- LOG.warn("Failed to get container iterator for volume {}", hddsVolume,
e);
+ LOG.warn("Failed to get container iterator for volume {}", srcVolume, e);
return null;
}
+ // Calculate maxAllowedUtilization
+ double idealUsage = volumeSet.getIdealUsage();
Review Comment:
I agree, it makes sense to also consider CommittedBytes, and delta value of
source volume.
Will do the changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]