cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1072215 - in /cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress: Session.java util/OperationThread.java
Date Sat, 19 Feb 2011 00:33:49 GMT
Author: brandonwilliams
Date: Sat Feb 19 00:33:49 2011
New Revision: 1072215

URL: http://svn.apache.org/viewvc?rev=1072215&view=rev
Log:
Fix key distribution in stress.java.
Patch by Pavel Yaskevich, reviewed by brandonwilliams for CASSANDRA-2147

Modified:
    cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java
    cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/util/OperationThread.java

Modified: cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java?rev=1072215&r1=1072214&r2=1072215&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java
(original)
+++ cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/Session.java
Sat Feb 19 00:33:49 2011
@@ -162,7 +162,7 @@ public class Session
                 STDev = Float.parseFloat(cmd.getOptionValue("s"));
 
             if (cmd.hasOption("r"))
-                random = Boolean.parseBoolean(cmd.getOptionValue("r"));
+                random = true;
 
             if (cmd.hasOption("f"))
             {

Modified: cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/util/OperationThread.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/util/OperationThread.java?rev=1072215&r1=1072214&r2=1072215&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/util/OperationThread.java
(original)
+++ cassandra/branches/cassandra-0.7/contrib/stress/src/org/apache/cassandra/contrib/stress/util/OperationThread.java
Sat Feb 19 00:33:49 2011
@@ -125,7 +125,9 @@ public abstract class OperationThread ex
     private double nextGaussian(int mu, float sigma)
     {
         Random random = Stress.randomizer;
+
         Double currentState = nextGaussian;
+        nextGaussian = null;
 
         if (currentState == null)
         {



Mime
View raw message