This is an automated email from the ASF dual-hosted git repository.
gian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new 297810e log correct moved count on balance instead of snapshot of
currently moving (#6032)
297810e is described below
commit 297810e7a41e934d1b95f98edcbca6c4adb9be60
Author: Clint Wylie <[email protected]>
AuthorDate: Wed Aug 1 03:36:10 2018 -0700
log correct moved count on balance instead of snapshot of currently moving
(#6032)
---
.../druid/server/coordinator/helper/DruidCoordinatorBalancer.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/server/src/main/java/io/druid/server/coordinator/helper/DruidCoordinatorBalancer.java
b/server/src/main/java/io/druid/server/coordinator/helper/DruidCoordinatorBalancer.java
index 8547954..b4db2a9 100644
---
a/server/src/main/java/io/druid/server/coordinator/helper/DruidCoordinatorBalancer.java
+++
b/server/src/main/java/io/druid/server/coordinator/helper/DruidCoordinatorBalancer.java
@@ -129,9 +129,9 @@ public class DruidCoordinatorBalancer implements
DruidCoordinatorHelper
final int maxSegmentsToMove =
Math.min(params.getCoordinatorDynamicConfig().getMaxSegmentsToMove(),
numSegments);
final int maxIterations = 2 * maxSegmentsToMove;
final int maxToLoad =
params.getCoordinatorDynamicConfig().getMaxSegmentsInNodeLoadingQueue();
- long unmoved = 0L;
+ int moved = 0, unmoved = 0;
- for (int moved = 0, iter = 0; (moved + unmoved) < maxSegmentsToMove;
++iter) {
+ for (int iter = 0; (moved + unmoved) < maxSegmentsToMove; ++iter) {
final BalancerSegmentHolder segmentToMoveHolder =
strategy.pickSegmentToMove(toMoveFrom);
if (segmentToMoveHolder != null &&
params.getAvailableSegments().contains(segmentToMoveHolder.getSegment())) {
@@ -179,14 +179,14 @@ public class DruidCoordinatorBalancer implements
DruidCoordinatorHelper
log.info("No good moves found in tier [%s]", tier);
}
stats.addToTieredStat("unmovedCount", tier, unmoved);
- stats.addToTieredStat("movedCount", tier,
currentlyMovingSegments.get(tier).size());
+ stats.addToTieredStat("movedCount", tier, moved);
if (params.getCoordinatorDynamicConfig().emitBalancingStats()) {
strategy.emitStats(tier, stats, toMoveFrom);
}
log.info(
"[%s]: Segments Moved: [%d] Segments Let Alone: [%d]",
tier,
- currentlyMovingSegments.get(tier).size(),
+ moved,
unmoved
);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]