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: [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]

Reply via email to