somandal commented on code in PR #15233:
URL: https://github.com/apache/pinot/pull/15233#discussion_r1989948827


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/DefaultRebalancePreChecker.java:
##########
@@ -53,16 +53,18 @@ public void init(PinotHelixResourceManager 
pinotHelixResourceManager, @Nullable
   }
 
   @Override
-  public Map<String, String> check(String rebalanceJobId, String 
tableNameWithType, TableConfig tableConfig) {
+  public Map<String, RebalancePreCheckerResult> check(String rebalanceJobId, 
String tableNameWithType,
+      TableConfig tableConfig) {
     LOGGER.info("Start pre-checks for table: {} with rebalanceJobId: {}", 
tableNameWithType, rebalanceJobId);
 
-    Map<String, String> preCheckResult = new HashMap<>();
+    Map<String, RebalancePreCheckerResult> preCheckResult = new HashMap<>();
     // Check for reload status
-    Boolean needsReload = checkReloadNeededOnServers(rebalanceJobId, 
tableNameWithType);
-    preCheckResult.put(NEEDS_RELOAD_STATUS, needsReload == null ? "error" : 
String.valueOf(needsReload));
+    RebalancePreCheckerResult needsReloadMessage = 
checkReloadNeededOnServers(rebalanceJobId, tableNameWithType);
+    preCheckResult.put(NEEDS_RELOAD_STATUS, needsReloadMessage);

Review Comment:
   done



##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/DefaultRebalancePreChecker.java:
##########
@@ -53,16 +53,18 @@ public void init(PinotHelixResourceManager 
pinotHelixResourceManager, @Nullable
   }
 
   @Override
-  public Map<String, String> check(String rebalanceJobId, String 
tableNameWithType, TableConfig tableConfig) {
+  public Map<String, RebalancePreCheckerResult> check(String rebalanceJobId, 
String tableNameWithType,
+      TableConfig tableConfig) {
     LOGGER.info("Start pre-checks for table: {} with rebalanceJobId: {}", 
tableNameWithType, rebalanceJobId);
 
-    Map<String, String> preCheckResult = new HashMap<>();
+    Map<String, RebalancePreCheckerResult> preCheckResult = new HashMap<>();
     // Check for reload status
-    Boolean needsReload = checkReloadNeededOnServers(rebalanceJobId, 
tableNameWithType);
-    preCheckResult.put(NEEDS_RELOAD_STATUS, needsReload == null ? "error" : 
String.valueOf(needsReload));
+    RebalancePreCheckerResult needsReloadMessage = 
checkReloadNeededOnServers(rebalanceJobId, tableNameWithType);
+    preCheckResult.put(NEEDS_RELOAD_STATUS, needsReloadMessage);
     // Check whether minimizeDataMovement is set in TableConfig
-    boolean isMinimizeDataMovement = 
checkIsMinimizeDataMovement(rebalanceJobId, tableNameWithType, tableConfig);
-    preCheckResult.put(IS_MINIMIZE_DATA_MOVEMENT, 
String.valueOf(isMinimizeDataMovement));
+    RebalancePreCheckerResult isMinimizeDataMovementMessage = 
checkIsMinimizeDataMovement(rebalanceJobId,
+        tableNameWithType, tableConfig);
+    preCheckResult.put(IS_MINIMIZE_DATA_MOVEMENT, 
isMinimizeDataMovementMessage);

Review Comment:
   done



-- 
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

Reply via email to