You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by lx...@apache.org on 2018/03/08 23:12:51 UTC
[2/2] helix git commit: Make logs are not printed with empty list in
intermediate stage
Make logs are not printed with empty list in intermediate stage
Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/5f142f2e
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/5f142f2e
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/5f142f2e
Branch: refs/heads/master
Commit: 5f142f2ec7dcf718111bbc9e94eb83d7689428f0
Parents: 5c5186b
Author: Junkai Xue <jx...@linkedin.com>
Authored: Fri Feb 2 13:52:50 2018 -0800
Committer: Lei Xia <lx...@linkedin.com>
Committed: Thu Mar 8 15:00:14 2018 -0800
----------------------------------------------------------------------
.../stages/IntermediateStateCalcStage.java | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/helix/blob/5f142f2e/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java b/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
index 0352bb1..047cc9b 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/stages/IntermediateStateCalcStage.java
@@ -238,12 +238,18 @@ public class IntermediateStateCalcStage extends AbstractBaseStage {
}
}
- logger.info(
- "recovery balance needed for " + resourceName + " partitions: " + partitionsNeedRecovery);
- logger.info(
- "load balance needed for " + resourceName + " partitions: " + partitionsNeedLoadbalance);
- logger.info("partition currently has ERROR replica in " + resourceName + " partitions: "
- + partitionshaveErrorStateReplica);
+ if (!partitionsNeedRecovery.isEmpty()) {
+ logger.info(
+ "recovery balance needed for " + resourceName + " partitions: " + partitionsNeedRecovery);
+ }
+ if (!partitionsNeedLoadbalance.isEmpty()) {
+ logger.info(
+ "load balance needed for " + resourceName + " partitions: " + partitionsNeedLoadbalance);
+ }
+ if (!partitionshaveErrorStateReplica.isEmpty()) {
+ logger.info("partition currently has ERROR replica in " + resourceName + " partitions: "
+ + partitionshaveErrorStateReplica);
+ }
chargePendingTransition(resource, currentStateOutput, throttleController,
partitionsNeedRecovery, partitionsNeedLoadbalance);