You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2015/11/01 12:48:15 UTC

[04/12] incubator-slider git commit: SLIDER-852 Included ChaosMonkey logging always print probability=0 (Sherry Guo via gourksaha)

SLIDER-852 Included ChaosMonkey logging always print probability=0 (Sherry Guo via gourksaha)


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/94b26104
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/94b26104
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/94b26104

Branch: refs/heads/feature/SLIDER-82-anti-affinity-attempt-2
Commit: 94b26104df96914858c7f149d5d9bb7c1d9fe8ac
Parents: 2c82985
Author: Gour Saha <go...@apache.org>
Authored: Fri Oct 23 12:03:47 2015 -0700
Committer: Gour Saha <go...@apache.org>
Committed: Fri Oct 23 12:03:47 2015 -0700

----------------------------------------------------------------------
 .../apache/slider/server/appmaster/monkey/ChaosMonkeyService.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/94b26104/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java b/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
index 27219e4..8948f0d 100644
--- a/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
+++ b/slider-core/src/main/java/org/apache/slider/server/appmaster/monkey/ChaosMonkeyService.java
@@ -60,7 +60,8 @@ public class ChaosMonkeyService extends AbstractService {
   public synchronized void addTarget(String name,
       ChaosTarget target, long probability) {
     if (probability > 0) {
-      log.info("Adding {} with probability {}", name, probability / InternalKeys.PROBABILITY_PERCENT_1);
+      log.info("Adding {} with probability {}", name,
+          ((double)probability) / InternalKeys.PROBABILITY_PERCENT_1);
       chaosEntries.add(new ChaosEntry(name, target, probability, metrics));
     } else {
       log.debug("Action {} not enabled", name);