adoroszlai commented on a change in pull request #2695:
URL: https://github.com/apache/ozone/pull/2695#discussion_r719159728
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
##########
@@ -315,6 +315,7 @@ void restartHddsDatanode(DatanodeDetails dn, boolean
waitForDatanode)
protected Optional<String> omId = Optional.empty();
protected Boolean randomContainerPort = true;
+ protected Optional<String> datanodeReservedSpace = Optional.of("0B");
Review comment:
I think a better default value would be:
```suggestion
protected Optional<String> datanodeReservedSpace = Optional.empty();
```
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java
##########
@@ -38,6 +31,13 @@
import
org.apache.hadoop.security.authentication.client.AuthenticationException;
import org.apache.ozone.test.GenericTestUtils;
+import java.io.IOException;
+import java.util.List;
+import java.util.Optional;
+import java.util.OptionalInt;
+import java.util.UUID;
+import java.util.concurrent.TimeoutException;
Review comment:
Nit: please avoid moving around imports unnecessarily.
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java
##########
@@ -818,6 +818,9 @@ protected String
getSCMAddresses(List<StorageContainerManager> scms) {
Path dir = Paths.get(datanodeBaseDir, "data-" + j, "containers");
Files.createDirectories(dir);
dataDirs.add(dir.toString());
+ datanodeReservedSpace.ifPresent(
+ s -> dnConf.set(ScmConfigKeys.HDDS_DATANODE_DIR_DU_RESERVED,
+ dir + ":" + s));
Review comment:
Since the same config property is set for each volume, reserved space
would only be set for the last one. It should be set once, outside the loop,
similar to `HDDS_DATANODE_DIR_KEY`.
Can you please add an assertion in
`TestMiniOzoneCluster#testMultipleDataDirs` to verify behavior?
--
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]