You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/02/28 20:40:34 UTC

[GitHub] egor-ryashin commented on a change in pull request #7154: rename maintenance mode to decommission

egor-ryashin commented on a change in pull request #7154: rename maintenance mode to decommission
URL: https://github.com/apache/incubator-druid/pull/7154#discussion_r261374035
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/server/coordinator/helper/DruidCoordinatorBalancer.java
 ##########
 @@ -107,25 +107,25 @@ private void balanceTier(
     }
 
     /*
-      Take as much segments from maintenance servers as priority allows and find the best location for them on
+      Take as many segments from decommissioned servers as priority allows and find the best location for them on
       available servers. After that, balance segments within available servers pool.
      */
     Map<Boolean, List<ServerHolder>> partitions =
-        servers.stream().collect(Collectors.partitioningBy(ServerHolder::isInMaintenance));
-    final List<ServerHolder> maintenanceServers = partitions.get(true);
+        servers.stream().collect(Collectors.partitioningBy(ServerHolder::isDecommissioned));
+    final List<ServerHolder> decommssionedServers = partitions.get(true);
     final List<ServerHolder> availableServers = partitions.get(false);
     log.info(
-        "Found %d servers in maintenance, %d available servers servers",
-        maintenanceServers.size(),
+        "Found %d decomissioned servers, %d available servers servers",
+        decommssionedServers.size(),
         availableServers.size()
     );
 
-    if (maintenanceServers.isEmpty()) {
+    if (decommssionedServers.isEmpty()) {
       if (availableServers.size() <= 1) {
         log.info("[%s]: %d available servers servers found.  Cannot balance.", tier, availableServers.size());
       }
     } else if (availableServers.isEmpty()) {
-      log.info("[%s]: no available servers servers found during maintenance.  Cannot balance.", tier);
+      log.info("[%s]: no available servers servers found during decommissioning.  Cannot balance.", tier);
     }
 
 Review comment:
   We can `return` here if no available servers exist. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org