cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject git commit: Consistently name get/set trace probability JMX calls.
Date Sat, 13 Sep 2014 17:28:37 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 319d9e13c -> acbc72230


Consistently name get/set trace probability JMX calls.

Patch by Nitzan Volman, reviewed by brandonwilliams for CASSANDRA-6926


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/acbc7223
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/acbc7223
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/acbc7223

Branch: refs/heads/trunk
Commit: acbc722303545d917e987426bcf821350ff96cbc
Parents: 319d9e1
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Sat Sep 13 12:27:48 2014 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Sat Sep 13 12:27:48 2014 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/service/QueryState.java        | 4 ++--
 src/java/org/apache/cassandra/service/StorageService.java    | 8 ++++----
 .../org/apache/cassandra/service/StorageServiceMBean.java    | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/acbc7223/src/java/org/apache/cassandra/service/QueryState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/QueryState.java b/src/java/org/apache/cassandra/service/QueryState.java
index 12fc392..4f3b0d5 100644
--- a/src/java/org/apache/cassandra/service/QueryState.java
+++ b/src/java/org/apache/cassandra/service/QueryState.java
@@ -67,8 +67,8 @@ public class QueryState
             return true;
         }
 
-        double tracingProbability = StorageService.instance.getTracingProbability();
-        return tracingProbability != 0 && FBUtilities.threadLocalRandom().nextDouble()
< tracingProbability;
+        double traceProbability = StorageService.instance.getTraceProbability();
+        return traceProbability != 0 && FBUtilities.threadLocalRandom().nextDouble()
< traceProbability;
     }
 
     public void prepareTracingSession(UUID sessionId)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/acbc7223/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 6714be6..7823d05 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -180,7 +180,7 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
     private volatile boolean joined = false;
 
     /* the probability for tracing any particular request, 0 disables tracing and 1 enables
for all */
-    private double tracingProbability = 0.0;
+    private double traceProbability = 0.0;
 
     private static enum Mode { STARTING, NORMAL, CLIENT, JOINING, LEAVING, DECOMMISSIONED,
MOVING, DRAINING, DRAINED }
     private Mode operationMode = Mode.STARTING;
@@ -3908,12 +3908,12 @@ public class StorageService extends NotificationBroadcasterSupport
implements IE
 
     public void setTraceProbability(double probability)
     {
-        this.tracingProbability = probability;
+        this.traceProbability = probability;
     }
 
-    public double getTracingProbability()
+    public double getTraceProbability()
     {
-        return tracingProbability;
+        return traceProbability;
     }
 
     public void disableAutoCompaction(String ks, String... columnFamilies) throws IOException

http://git-wip-us.apache.org/repos/asf/cassandra/blob/acbc7223/src/java/org/apache/cassandra/service/StorageServiceMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index 8bb13ae..1331b50 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -490,7 +490,7 @@ public interface StorageServiceMBean extends NotificationEmitter
     /**
      * Returns the configured tracing probability.
      */
-    public double getTracingProbability();
+    public double getTraceProbability();
 
     void disableAutoCompaction(String ks, String ... columnFamilies) throws IOException;
     void enableAutoCompaction(String ks, String ... columnFamilies) throws IOException;


Mime
View raw message