You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/12/25 00:48:38 UTC

[GitHub] [ozone] symious commented on a change in pull request #2893: HDDS-6070. ContainerBalancerConfig doesn't read config from ozone-site.xml

symious commented on a change in pull request #2893:
URL: https://github.com/apache/ozone/pull/2893#discussion_r775093443



##########
File path: hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancer.java
##########
@@ -589,6 +593,23 @@ public void balancerShouldFollowExcludeAndIncludeDatanodesConfigurations() {
     }
   }
 
+  @Test
+  public void testContainerBalancerConfiguration() {
+    OzoneConfiguration ozoneConfiguration = new OzoneConfiguration();
+    ozoneConfiguration.set("ozone.scm.container.size", "5GB");
+    ozoneConfiguration.setDouble(
+        "hdds.container.balancer.utilization.threshold", 0.01);
+
+    ContainerBalancerConfiguration cbConf =
+        ozoneConfiguration.getObject(ContainerBalancerConfiguration.class);
+    Assert.assertEquals(cbConf.getThreshold(), 0.01d, DELTA);
+

Review comment:
       I have removed DELTA and use a similar comparison as https://github.com/apache/ozone/blob/8b4d4a9c0421f68d8388f43496bf481eb59d8c62/hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/ozone/container/placement/TestContainerPlacement.java#L76
   , please have a check.




-- 
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