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 2018/10/10 19:15:32 UTC
[GitHub] clintropolis commented on a change in pull request #6349:
maintenance mode for Historical
clintropolis commented on a change in pull request #6349: maintenance mode for Historical
URL: https://github.com/apache/incubator-druid/pull/6349#discussion_r224205657
##########
File path: server/src/main/java/org/apache/druid/server/coordinator/rules/LoadRule.java
##########
@@ -144,16 +144,16 @@ private void assign(
private static List<ServerHolder> getFilteredHolders(
final String tier,
final DruidCluster druidCluster,
- final Predicate<ServerHolder> predicate
+ Predicate<ServerHolder> predicate
)
{
final NavigableSet<ServerHolder> queue = druidCluster.getHistoricalsByTier(tier);
if (queue == null) {
log.makeAlert("Tier[%s] has no servers! Check your cluster configuration!", tier).emit();
return Collections.emptyList();
}
-
- return queue.stream().filter(predicate).collect(Collectors.toList());
+ Predicate<ServerHolder> isGeneral = s -> !s.isInMaintenance();
Review comment:
Why not `isAvailable` or something along those lines since the implication is that these servers are available to assign segments to, and to go along with your other variable rename suggestion in balancer logic
----------------------------------------------------------------
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