sodonnel commented on a change in pull request #142: HDDS-2448 Delete container command should used a thread pool URL: https://github.com/apache/hadoop-ozone/pull/142#discussion_r348014581
########## File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java ########## @@ -58,4 +63,25 @@ public int getReplicationMaxStreams() { return replicationMaxStreams; } + @Config(key = "delete.container.threads", + type = ConfigType.INT, + defaultValue = "2", + tags = {DATANODE}, + description = "The maximum number of threads used to delete containers " + + "on a datanode" + ) + public void setDeleteContainerThreads(int val) { + if (val < 1) { + LOG.warn("hdds.datanode.delete.container.threads must be greater than" + + "zero and was set to {}. Defaulting to {}", + val, deleteContainerThreads); Review comment: These are good points. For now, I have kept the warn log message, as I don't like the idea of silently ignoring bad values. From a usability perspective, I would like the DN to still start if an operator puts a bad value in the config rather than fail completely. However it is easy to argue this the other way too, that we should fail on a bad value rather than trying to be too clever. I have taken on the default point and applied it to both parameters in the DatanodeConfig class. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org