cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [01/10] cassandra git commit: Add nodetool gettraceprobability command
Date Mon, 31 Aug 2015 21:43:29 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 8a8a5a428 -> 57d48a9ba
  refs/heads/cassandra-2.2 0d2f4038f -> 8c43b8c3f
  refs/heads/cassandra-3.0 3bc585d5d -> f3c5faba0
  refs/heads/trunk 5d0c6ef77 -> c5632c400


Add nodetool gettraceprobability command

Patch by Sequoyha Pelletier, reviewed by brandonwilliams for
CASSANDRA-10234


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

Branch: refs/heads/cassandra-2.1
Commit: 57d48a9ba074810ebb25324d3bfc4db086a1c44d
Parents: 8a8a5a4
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Aug 31 16:40:00 2015 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Aug 31 16:41:34 2015 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../org/apache/cassandra/tools/NodeProbe.java   |  2 ++
 .../org/apache/cassandra/tools/NodeTool.java    |  1 +
 .../tools/nodetool/GetTraceProbability.java     | 33 ++++++++++++++++++++
 4 files changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/57d48a9b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7841f9b..d57eaf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Only check KeyCache when it is enabled
  * Change streaming_socket_timeout_in_ms default to 1 hour (CASSANDRA-8611)
  * (cqlsh) update list of CQL keywords (CASSANDRA-9232)
+ * Add nodetool gettraceprobability command (CASSANDRA-10234)
 
 
 2.1.9

http://git-wip-us.apache.org/repos/asf/cassandra/blob/57d48a9b/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index caa12c3..51b1c93 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -971,6 +971,8 @@ public class NodeProbe implements AutoCloseable
         return ssProxy.getStreamThroughputMbPerSec();
     }
 
+    public double getTraceProbability() {return ssProxy.getTraceProbability();}
+
     public int getExceptionCount()
     {
         return ssProxy.getExceptionCount();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/57d48a9b/src/java/org/apache/cassandra/tools/NodeTool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java b/src/java/org/apache/cassandra/tools/NodeTool.java
index 8e88f45..cc6e6d4 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -138,6 +138,7 @@ public class NodeTool
                 GetCompactionThreshold.class,
                 GetCompactionThroughput.class,
                 GetStreamThroughput.class,
+                GetTraceProbability.class,
                 GetEndpoints.class,
                 GetSSTables.class,
                 GossipInfo.class,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/57d48a9b/src/java/org/apache/cassandra/tools/nodetool/GetTraceProbability.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/nodetool/GetTraceProbability.java b/src/java/org/apache/cassandra/tools/nodetool/GetTraceProbability.java
new file mode 100644
index 0000000..3940790
--- /dev/null
+++ b/src/java/org/apache/cassandra/tools/nodetool/GetTraceProbability.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.tools.nodetool;
+
+import io.airlift.command.Command;
+
+import org.apache.cassandra.tools.NodeProbe;
+import org.apache.cassandra.tools.NodeTool.NodeToolCmd;
+
+@Command(name = "gettraceprobability", description = "Print the current trace probability
value")
+public class GetTraceProbability extends NodeToolCmd
+{
+    @Override
+    public void execute(NodeProbe probe)
+    {
+        System.out.println("Current trace probability: " + probe.getTraceProbability());
+    }
+}


Mime
View raw message