klsince commented on code in PR #11730: URL: https://github.com/apache/pinot/pull/11730#discussion_r1346222634
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/RebalanceConfig.java: ########## @@ -0,0 +1,189 @@ +/** + * 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.pinot.controller.helix.core.rebalance; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + + +@ApiModel +public class RebalanceConfig { + // Whether to rebalance table in dry-run mode + @JsonProperty("dryRun") + @ApiModelProperty(example = "false") + private boolean _dryRun = false; + + // Whether to reassign instances before reassigning segments + @JsonProperty("reassignInstances") + @ApiModelProperty(example = "false") + private boolean _reassignInstances = false; + + // Whether to reassign CONSUMING segments + @JsonProperty("includeConsuming") + @ApiModelProperty(example = "false") + private boolean _includeConsuming = false; + + // Whether to rebalance table in bootstrap mode (regardless of minimum segment movement, reassign all segments in a + // round-robin fashion as if adding new segments to an empty table) + @JsonProperty("bootstrap") + @ApiModelProperty(example = "false") + private boolean _bootstrap = false; + + // Whether to allow downtime for the rebalance + @JsonProperty("downtime") + @ApiModelProperty(example = "false") + private boolean _downtime = false; + + // For no-downtime rebalance, minimum number of replicas to keep alive during rebalance, or maximum number of replicas + // allowed to be unavailable if value is negative + @JsonProperty("minAvailableReplicas") + @ApiModelProperty(example = "1") + private int _minAvailableReplicas = 1; Review Comment: in fact, the DEFAULT_MIN_REPLICAS_TO_KEEP_UP_FOR_NO_DOWNTIME was only used in `...spi.utils.builder.ControllerRequestURLBuilder`, but RebalanceConfig is in controller pkg. -- 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]
