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/31 06:01:18 UTC

[GitHub] [ozone] siddhantsangwan opened a new pull request #2097: HDDS-4925. Introduce ContainerBalancer in SCM with start/stop capabilities.

siddhantsangwan opened a new pull request #2097:
URL: https://github.com/apache/ozone/pull/2097


   ## What changes were proposed in this pull request?
   
   Introducing `ContainerBalancer` with start and stop methods. `ContainerBalancerConfiguration` class contains the necessary config values. Adding `BALANCER` tag in `ConfigTag`. `ContainerBalancer` is constructed when `StorageContainerManager` is created.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4925
   
   ## How was this patch tested?
   
   `TestStorageContainerManagerHA`
   


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


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

Posted by GitBox <gi...@apache.org>.
lokeshj1703 commented on pull request #2097:
URL: https://github.com/apache/ozone/pull/2097#issuecomment-814669922


   @siddhantsangwan Thanks for the contribution! I have committed the PR to master branch.


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


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

Posted by GitBox <gi...@apache.org>.
siddhantsangwan commented on pull request #2097:
URL: https://github.com/apache/ozone/pull/2097#issuecomment-811881994


   I have incorporated the suggestions and made some other changes to pass the findbugs check. Please let me know if there are any more suggestions.


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


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

Posted by GitBox <gi...@apache.org>.
lokeshj1703 closed pull request #2097:
URL: https://github.com/apache/ozone/pull/2097


   


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


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

Posted by GitBox <gi...@apache.org>.
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