You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "siddhantsangwan (via GitHub)" <gi...@apache.org> on 2023/04/06 13:07:40 UTC
[GitHub] [ozone] siddhantsangwan commented on a diff in pull request #4542: HDDS-8170. Let ContainerBalancer consider EC containers for balancing
siddhantsangwan commented on code in PR #4542:
URL: https://github.com/apache/ozone/pull/4542#discussion_r1159774179
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerSelectionCriteria.java:
##########
@@ -158,10 +162,14 @@ private Comparator<ContainerID> orderContainersByUsedBytes() {
* Checks whether a Container has the ReplicationType
* {@link HddsProtos.ReplicationType#EC}.
* @param container container to check
- * @return true if the ReplicationType is EC, else false
+ * @return true if the ReplicationType is EC and "hdds.scm.replication
+ * .enable.legacy" is true, else false
*/
private boolean isECContainer(ContainerInfo container) {
- return container.getReplicationType().equals(HddsProtos.ReplicationType.EC);
+ boolean legacyEnabled = ozoneConfiguration.
+ getBoolean("hdds.scm.replication.enable.legacy", true);
Review Comment:
Okay, I'm using `replicationManager.getConfig().isLegacyEnabled()` in this class and `ContainerBalancerTask` as well now. Changed the unit tests accordingly.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org