siddharthteotia commented on a change in pull request #4446: Add support in the 
rebalancer for the user to provide minimum number of serving replicas
URL: https://github.com/apache/incubator-pinot/pull/4446#discussion_r308348386
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/TableRebalancer.java
 ##########
 @@ -110,6 +115,8 @@ public RebalanceResult rebalance(TableConfig tableConfig, 
RebalanceSegmentStrate
           strategy.getRebalancedIdealState(previousIdealState, tableConfig, 
rebalanceConfig, partitionAssignment);
       result.setIdealStateMapping(idealState.getRecord().getMapFields());
       result.setPartitionAssignment(partitionAssignment);
+      result.setStatus(RebalanceResult.RebalanceStatus.DONE);
+      _rebalancerStats.dryRun = 1;
 
 Review comment:
   For a given invocation of Rebalancer tool (either through command line or 
rest api), we create a single instance of TableRebalancer and invoke the 
rebalance() method. The stats are computed in a cumulative manner for that 
invocation. However, if the user invoked it in dry run mode then dryRun is set 
to 1 -- it can only be 1 for that invocation

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to