Jackie-Jiang commented on code in PR #11730: URL: https://github.com/apache/pinot/pull/11730#discussion_r1344847933
########## pinot-spi/src/main/java/org/apache/pinot/spi/utils/RebalanceConfigConstants.java: ########## @@ -19,18 +19,13 @@ package org.apache.pinot.spi.utils; /** - * Constants for rebalance config properties + * Defaults for rebalance configs are defined here. But use RebalanceConfig to define the configs, and deprecate Review Comment: Should we just remove this class? (since we already moved 2 fields) ########## pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java: ########## @@ -584,7 +584,7 @@ public SuccessResponse deleteTenant( @ApiOperation(value = "Rebalances all the tables that are part of the tenant") public TenantRebalanceResult rebalance( @ApiParam(value = "Name of the tenant whose table are to be rebalanced", required = true) - @PathParam("tenantName") String tenantName, @ApiParam(required = true) TenantRebalanceContext context) { + @PathParam("tenantName") String tenantName, @ApiParam(required = true) TenantRebalanceConfig context) { Review Comment: ```suggestion @PathParam("tenantName") String tenantName, @ApiParam(required = true) TenantRebalanceConfig config) { ``` ########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/RebalanceConfig.java: ########## @@ -0,0 +1,193 @@ +/** + * 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; +import org.apache.commons.configuration.Configuration; +import org.apache.pinot.spi.utils.CommonConstants; +import org.apache.pinot.spi.utils.RebalanceConfigConstants; + + +@ApiModel +public class RebalanceConfig { + @JsonProperty("dryRun") + @ApiModelProperty(example = "false") + private boolean _dryRun = false; Review Comment: (minor) Add some whitespace for readability ########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/assignment/segment/SegmentAssignment.java: ########## @@ -63,7 +65,17 @@ List<String> assignSegment(String segmentName, Map<String, Map<String, String>> * @param config Configuration for the rebalance * @return Rebalanced assignment for the segments */ + @Deprecated Review Comment: We can probably directly modify this because this interface is internal only -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org