cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [1/6] cassandra git commit: Don't let stress write warmup data if n=0
Date Tue, 22 Aug 2017 01:38:39 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 ec85b4a96 -> 6a1b1f26b
  refs/heads/cassandra-3.11 7f8417c40 -> 59d4c2719
  refs/heads/trunk 97b1c3ce8 -> 3d4a7e7b6


Don't let stress write warmup data if n=0

patch by Eduard Tudenhoefner; reviewed by Stefania Alborghetti for CASSANDRA-13773


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

Branch: refs/heads/cassandra-3.0
Commit: 6a1b1f26b7174e8c9bf86a96514ab626ce2a4117
Parents: ec85b4a
Author: Eduard Tudenhoefner <eduard.tudenhoefner@datastax.com>
Authored: Mon Aug 21 11:11:00 2017 +0800
Committer: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Committed: Tue Aug 22 09:28:00 2017 +0800

----------------------------------------------------------------------
 CHANGES.txt                                              |  1 +
 .../src/org/apache/cassandra/stress/StressAction.java    | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a1b1f26/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d8b22f0..97dda05 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.15
+ * Don't let stress write warmup data if n=0 (CASSANDRA-13773)
  * Gossip thread slows down when using batch commit log (CASSANDRA-12966)
  * Randomize batchlog endpoint selection with only 1 or 2 racks (CASSANDRA-12884)
  * Fix digest calculation for counter cells (CASSANDRA-13750)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6a1b1f26/tools/stress/src/org/apache/cassandra/stress/StressAction.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressAction.java b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
index cda54a0..8b15e92 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -54,6 +54,13 @@ public class StressAction implements Runnable
         // creating keyspace and column families
         settings.maybeCreateKeyspaces();
 
+        if (settings.command.count == 0)
+        {
+            output.println("N=0: SCHEMA CREATED, NOTHING ELSE DONE.");
+            settings.disconnect();
+            return;
+        }
+
         output.println("Sleeping 2s...");
         Uninterruptibles.sleepUninterruptibly(2, TimeUnit.SECONDS);
 
@@ -87,9 +94,7 @@ public class StressAction implements Runnable
     {
         PrintStream warmupOutput = new PrintStream(new OutputStream() { @Override public
void write(int b) throws IOException { } } );
         // do 25% of iterations as warmup but no more than 50k (by default hotspot compiles
methods after 10k invocations)
-        int iterations = (settings.command.count > 0
-                         ? Math.min(50000, (int)(settings.command.count * 0.25))
-                         : 50000) * settings.node.nodes.size();
+        int iterations = Math.min(50000, (int) (settings.command.count * 0.25)) * settings.node.nodes.size();
         int threads = 100;
 
         if (settings.rate.maxThreads > 0)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message