ChenSammi commented on code in PR #3874: URL: https://github.com/apache/ozone/pull/3874#discussion_r1105346451
########## hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/diskbalancer/DiskBalancerInfo.java: ########## @@ -0,0 +1,111 @@ +/* + * 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 + * <p> + * http://www.apache.org/licenses/LICENSE-2.0 + * <p> + * 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.ozone.container.diskbalancer; + +import org.apache.hadoop.hdds.scm.storage.DiskBalancerConfiguration; + +import java.util.Objects; + +/** + * DiskBalancer's information to persist. + */ +public class DiskBalancerInfo { + private boolean shouldRun; + private double threshold; + private long bandwidthInMB; + private int parallelThread; Review Comment: Version number is usually to support the backward compatibility. Currently, these four properties are persistent on disk, let's say it's V1. In future, for example, to support one bandwidthInMB for night time, and one bandwidthInMB in day time, then there will be new properties need persist, it is V2. If ozone binaries are upgraded to V2, but the on disk info file is still V1, then ozone should recognize the file format as V1 and properly handle it. -- 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]
