Daniilchik commented on code in PR #7328:
URL: https://github.com/apache/ozone/pull/7328#discussion_r1806548872


##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestReservedVolumeSpace.java:
##########
@@ -166,6 +168,17 @@ public void testInvalidConfig() throws Exception {
     assertEquals(getExpectedDefaultReserved(hddsVolume2), reservedFromVolume2);
   }
 
+  @Test()
+  public void testInvalidConfigThrowsException() {
+    OzoneConfiguration conf = new OzoneConfiguration();
+    conf.set(ScmConfigKeys.HDDS_DATANODE_DIR_DU_RESERVED, "15GB");
+
+    assertThrows(ConfigurationException.class, () -> {
+      HddsVolume hddsVolume = volumeBuilder.conf(conf).build();
+      return null;
+    });

Review Comment:
   Done



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java:
##########
@@ -220,9 +221,7 @@ private static long getReserved(ConfigurationSource conf, 
String rootDir,
     for (String reserve : reserveList) {
       String[] words = reserve.split(":");
       if (words.length < 2) {
-        LOG.error("Reserved space should be configured in a pair, but current 
value is {}",
-            reserve);
-        continue;
+        throw new ConfigurationException("Reserved space should be configured 
in a pair");

Review Comment:
   Done



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