MarkGaox commented on code in PR #2680:
URL: https://github.com/apache/helix/pull/2680#discussion_r1373528676
##########
helix-rest/src/main/java/org/apache/helix/rest/clusterMaintenanceService/StoppableInstancesSelector.java:
##########
@@ -118,10 +152,22 @@ public void getStoppableInstancesCrossZones() {
*
* @param random Indicates whether to randomize the order of zones.
*/
- public void calculateOrderOfZone(boolean random) {
+ public void calculateOrderOfZone(List<String> instances, boolean random) {
Review Comment:
At line 177, it's used to determine whether we want to do the shuffling of
_orderOfZone. if random:`Collections.shuffle(_orderOfZone);`
##########
helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/InstancesAccessor.java:
##########
@@ -235,7 +239,22 @@ private Response batchGetStoppableInstances(String
clusterId, JsonNode node, boo
OBJECT_MAPPER.getTypeFactory().constructCollectionType(List.class,
String.class));
if (!orderOfZone.isEmpty() && random) {
String message =
- "Both 'orderOfZone' and 'random' parameters are set. Please
specify only one option.";
+ "Both 'zone_order' and 'random' parameters are set. Please
specify only one option.";
+ _logger.error(message);
+ return badRequest(message);
+ }
+ }
+
+ if
(node.get(InstancesAccessor.InstancesProperties.to_be_stopped_instances.name())
!= null) {
Review Comment:
Yes. This will be provided by user. We won't construct and save the
`to_be_stopped_instances` in our code.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]