somandal commented on code in PR #15175: URL: https://github.com/apache/pinot/pull/15175#discussion_r1994287916
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/DefaultRebalancePreChecker.java: ########## @@ -42,19 +47,28 @@ public class DefaultRebalancePreChecker implements RebalancePreChecker { public static final String NEEDS_RELOAD_STATUS = "needsReloadStatus"; public static final String IS_MINIMIZE_DATA_MOVEMENT = "isMinimizeDataMovement"; + public static final String DISK_UTILIZATION = "diskUtilization"; + + private static double _diskUtilizationThreshold; protected PinotHelixResourceManager _pinotHelixResourceManager; protected ExecutorService _executorService; @Override - public void init(PinotHelixResourceManager pinotHelixResourceManager, @Nullable ExecutorService executorService) { + public void init(PinotHelixResourceManager pinotHelixResourceManager, @Nullable ExecutorService executorService, + double diskUtilizationThreshold) { _pinotHelixResourceManager = pinotHelixResourceManager; _executorService = executorService; + _diskUtilizationThreshold = diskUtilizationThreshold; } @Override - public Map<String, String> check(String rebalanceJobId, String tableNameWithType, TableConfig tableConfig) { - LOGGER.info("Start pre-checks for table: {} with rebalanceJobId: {}", tableNameWithType, rebalanceJobId); + public Map<String, String> check(TableFacts tableFacts) { Review Comment: +1 - I think in the future we might want to make the threshold configurable via `RebalanceConfig` in which case having it passed in from `check` is better. We can still have the config based `_diskUtilizationThreshold` in init though, as that could be the default if no `RebalanceConfig` override is provided. what do you folks think? but in that case, maybe we can do that once we add an override in `RebalanceConfig`? -- 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