Gargi-jais11 commented on code in PR #8932: URL: https://github.com/apache/ozone/pull/8932#discussion_r2324334653
########## hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/storage/DiskBalancerConfiguration.java: ########## @@ -0,0 +1,296 @@ +/* + * 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.storage; + +import static org.apache.hadoop.hdds.conf.ConfigTag.DATANODE; + +import jakarta.annotation.Nonnull; +import java.time.Duration; +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; +import org.apache.hadoop.hdds.protocol.proto.HddsProtos; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * This class contains configuration values for the DiskBalancer. + */ +@ConfigGroup(prefix = "hdds.datanode.disk.balancer") +public final class DiskBalancerConfiguration { + private static final Logger LOG = + LoggerFactory.getLogger(DiskBalancerConfiguration.class); + + @Config(key = "info.dir", type = ConfigType.STRING, + defaultValue = "", tags = {ConfigTag.DISKBALANCER}, + description = "The path where datanode diskBalancer's conf is to be " + + "written to. if this property is not defined, ozone will fall " + + "back to use metadata directory instead.") + private String infoDir; + + @Config(key = "volume.density.threshold", type = ConfigType.DOUBLE, + defaultValue = "10", tags = {ConfigTag.DISKBALANCER}, + description = "Threshold is a percentage in the range of 0 to 100. A " + + "datanode is considered balanced if for each volume, the " + + "utilization of the volume(used space to capacity ratio) differs" + + " from the utilization of the datanode(used space to capacity ratio" + + " of the entire datanode) no more than the threshold.") + private double threshold = 10d; + + @Config(key = "max.disk.throughputInMBPerSec", type = ConfigType.LONG, Review Comment: I checked it is prefered to keep same property name as used in HDFS. -- 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]
