wuchong commented on code in PR #1452:
URL: https://github.com/apache/fluss/pull/1452#discussion_r2668770546


##########
fluss-server/src/main/java/org/apache/fluss/server/zk/data/RebalancePlan.java:
##########
@@ -48,7 +51,10 @@ public class RebalancePlan {
             planForBucketsOfPartitionedTable;
 
     public RebalancePlan(
-            RebalanceStatus rebalanceStatus, Map<TableBucket, 
RebalancePlanForBucket> bucketPlan) {
+            String rebalanceId,
+            RebalanceStatus rebalanceStatus,

Review Comment:
   @platinumhamburg I agree.
   
   How about this:
   
   ```java
   CompletableFuture<RebalancePlan> rebalance(List<GoalType> priorityGoals, 
boolean dryRun);
   ==>
   // triggers a rebalance task, and returns the rebalance id, in the future we 
can make the plan generation async
   CompletableFuture<String> rebalance(List<GoalType> priorityGoals);
   // returns a dry run plan for the goals, introduce in future, remove for 
now. 
   // CompletableFuture<RebalancePlan> rebalancePlan(List<GoalType> 
priorityGoals);
   
   // return optional progress. empty if no rebalance in progress. 
   CompletableFuture<Optional<RebalanceProgress>> 
listRebalanceProgress(@Nullable String rebalanceId);
   
   // RebalanceProgress still contains rebalance id, status, and plan to check 
the detailed progress per bucket. 
   
   
   // In ZK, we should json serialize RebalanceTask to distinguish class 
`RebalanceProgress` and `RebalancePlan`
   // because it records the top-level status, but not record per-bucket 
rebalance status
   ```
   
   What do you think @swuferhong ?
   



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

Reply via email to