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/03/10 20:50:26 UTC

[GitHub] [ozone] amaliujia commented on a change in pull request #1970: HDDS-4879. Support reserved space for single dir

amaliujia commented on a change in pull request #1970:
URL: https://github.com/apache/ozone/pull/1970#discussion_r591861457



##########
File path: hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeInfo.java
##########
@@ -83,6 +89,31 @@ public VolumeInfo build() throws IOException {
     }
   }
 
+  private long getReserved(ConfigurationSource conf) {
+    Collection<String> reserveList = conf.getTrimmedStringCollection(
+        HDDS_DATANODE_DIR_DU_RESERVED);
+    for (String reserve : reserveList) {
+      String[] words = reserve.split(":");
+      if (words.length < 2) {
+        LOG.error("Reserved space should config in pair, but current is {}",
+            reserve);
+        continue;
+      }
+
+      if (words[0].trim().equals(rootDir)) {

Review comment:
       Do we need to LOG something when `words[0].trim().equals(rootDir)` is not true?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org