From 429e23d3b2741211abff1677ef23d48e33f3b55d Mon Sep 17 00:00:00 2001 From: Nelson Ray Date: Wed, 13 Feb 2013 08:57:39 -0800 Subject: [PATCH] change break to continue in BalancerCostAnalyzer to skip calculating cost when it's not necessary --- .../main/java/com/metamx/druid/master/BalancerCostAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java b/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java index 3a08c4a05f3..6e7ca4d20a4 100644 --- a/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java +++ b/server/src/main/java/com/metamx/druid/master/BalancerCostAnalyzer.java @@ -201,7 +201,7 @@ public class BalancerCostAnalyzer if (proposalSegmentSize > server.getAvailableSize() || server.isServingSegment(proposalSegment) || server.isLoadingSegment(proposalSegment)) { - break; + continue; } /** The contribution to the total cost of a given server by proposing to move the segment to that server is... */