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/04/01 07:17:15 UTC

[GitHub] [ozone] lokeshj1703 commented on a change in pull request #2097: HDDS-4925. Introduce ContainerBalancer in SCM with start/stop capabilities.

lokeshj1703 commented on a change in pull request #2097:
URL: https://github.com/apache/ozone/pull/2097#discussion_r605426751



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerConfiguration.java
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.hadoop.hdds.scm.container.balancer;
+
+import org.apache.hadoop.hdds.conf.Config;
+import org.apache.hadoop.hdds.conf.ConfigGroup;
+import org.apache.hadoop.hdds.conf.ConfigTag;
+import org.apache.hadoop.hdds.conf.ConfigType;
+
+/**
+ * This class contains configuration values for the ContainerBalancer.
+ */
+@ConfigGroup(prefix = "hdds.container.balancer")
+public final class ContainerBalancerConfiguration {
+  @Config(key = "threshold", type = ConfigType.AUTO, defaultValue = "0.1",

Review comment:
       Let's have a prefix "utilisation" or sth more suitable for this key.

##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/balancer/ContainerBalancerConfiguration.java
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.hadoop.hdds.scm.container.balancer;
+
+import org.apache.hadoop.hdds.conf.Config;
+import org.apache.hadoop.hdds.conf.ConfigGroup;
+import org.apache.hadoop.hdds.conf.ConfigTag;
+import org.apache.hadoop.hdds.conf.ConfigType;
+
+/**
+ * This class contains configuration values for the ContainerBalancer.
+ */
+@ConfigGroup(prefix = "hdds.container.balancer")
+public final class ContainerBalancerConfiguration {
+  @Config(key = "threshold", type = ConfigType.AUTO, defaultValue = "0.1",
+      tags = {ConfigTag.BALANCER}, description = "Threshold is a fraction " +
+      "in the range of 0 to 1. A cluster is considered balanced if for each " +
+      "datanode, the utilization of the datanode (used space to capacity " +
+      "ratio) differs from the utilization of the cluster (used " +
+      "space to capacity ratio of the entire cluster) no more than the " +
+      "threshold value.")
+  private double threshold;
+
+  @Config(key = "max.datanodes.balanced", type = ConfigType.INT,

Review comment:
       Lets rename the key to datanodes.balanced.max. max can be suffix. Similarly for the other config.




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