J-HowHuang commented on code in PR #15891: URL: https://github.com/apache/pinot/pull/15891#discussion_r2114560317
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/tenant/TenantRebalanceConfig.java: ########## @@ -63,6 +79,7 @@ public void setParallelWhitelist(Set<String> parallelWhitelist) { _parallelWhitelist = parallelWhitelist; } + @ApiModelProperty(hidden = true) Review Comment: This hidden flag is actually to hide the fields from the data model in swagger. The reason of doing so is that, the new API expects users to pass the tenant rebalance parameters (e.g. `allowTables`, `degreeOfParallelism`) using URL query parameters and pass the rebalance (table level) parameters as a `RebalanceConfig` via request body, instead of putting everything altogether as a `TenantRebalanceConfig` object via the request body, which the current API does. To make it compatible to the current API, the handler still needs to accept `TenantRebalanceConfig` as the request body. But because we have allowed those parameters to be specified via query params, so we can hide them from the example body on swagger to avoid confusions. If you look into the swagger screenshot (`POST /tenants/<tenant_name>/rebalance`) in the write up, the request body is showing a `RebalanceConfig` as default example value because all the derived fields of `TenantRebalanceConfig` are hidden by the flag. Beyond swagger, this API is handled as following: it receives `TenantRebalanceConfig` as request body, and if any derived fields of `TenantRebalanceConfig` are specified via query params, it will override the one in the request body. So the existing API calls are going to expect the same behavior, while the new way is preferred. -- 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