siddhantsangwan commented on code in PR #6050:
URL: https://github.com/apache/ozone/pull/6050#discussion_r1470626473
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerSelectionCriteria.java:
##########
@@ -165,7 +152,21 @@ private boolean
isECContainerAndLegacyRMEnabled(ContainerInfo container) {
&& replicationManager.getConfig().isLegacyEnabled();
}
- private boolean shouldBeExcluded(ContainerID containerID,
+ /**
+ * Gets containers that are suitable for moving based on the following
+ * required criteria:
+ * 1. Container must not be in ExcludedContainers.
+ * 2. Container must not be in SelectedContainers.
Review Comment:
Points 1 and 2 duplicate points 6 and 4, respectively.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerSelectionCriteria.java:
##########
@@ -165,7 +152,21 @@ private boolean
isECContainerAndLegacyRMEnabled(ContainerInfo container) {
&& replicationManager.getConfig().isLegacyEnabled();
}
- private boolean shouldBeExcluded(ContainerID containerID,
+ /**
+ * Gets containers that are suitable for moving based on the following
+ * required criteria:
+ * 1. Container must not be in ExcludedContainers.
+ * 2. Container must not be in SelectedContainers.
+ * 3. Container must not be undergoing replication.
+ * 4. Container must not already be selected for balancing.
+ * 5. Container size should be closer to 5GB.
+ * 6. Container must not be in the configured exclude containers list.
+ * 7. Container should be closed.
+ * 8. If the {@link LegacyReplicationManager} is enabled, then the container
should not be an EC container.
+ * @param node DatanodeDetails for which to find candidate containers.
+ * @return Set of candidate containers that satisfy the criteria.
Review Comment:
`@return` should be updated.
--
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]