cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject svn commit: r1089985 - in /cassandra/trunk/tools/stress: bin/stress src/org/apache/cassandra/stress/operations/CounterAdder.java
Date Thu, 07 Apr 2011 20:20:00 GMT
Author: slebresne
Date: Thu Apr  7 20:20:00 2011
New Revision: 1089985

URL: http://svn.apache.org/viewvc?rev=1089985&view=rev
Log:
Fix stress for CASSANDRA-2384 (patch by stuhood)

Modified:
    cassandra/trunk/tools/stress/bin/stress
    cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java

Modified: cassandra/trunk/tools/stress/bin/stress
URL: http://svn.apache.org/viewvc/cassandra/trunk/tools/stress/bin/stress?rev=1089985&r1=1089984&r2=1089985&view=diff
==============================================================================
--- cassandra/trunk/tools/stress/bin/stress (original)
+++ cassandra/trunk/tools/stress/bin/stress Thu Apr  7 20:20:00 2011
@@ -48,4 +48,4 @@ if [ "x$JAVA" = "x" ]; then
     exit 1
 fi
 
-$JAVA -server -cp $CLASSPATH org.apache.cassandra.contrib.stress.Stress $@
+$JAVA -server -cp $CLASSPATH org.apache.cassandra.stress.Stress $@

Modified: cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java?rev=1089985&r1=1089984&r2=1089985&view=diff
==============================================================================
--- cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java
(original)
+++ cassandra/trunk/tools/stress/src/org/apache/cassandra/stress/operations/CounterAdder.java
Thu Apr  7 20:20:00 2011
@@ -62,7 +62,7 @@ public class CounterAdder extends Operat
         }
 
         String rawKey = String.format(format, index);
-        Map<ByteBuffer, Map<String, List<CounterMutation>>> record = new
HashMap<ByteBuffer, Map<String, List<CounterMutation>>>();
+        Map<ByteBuffer, Map<String, List<Mutation>>> record = new HashMap<ByteBuffer,
Map<String, List<Mutation>>>();
 
         record.put(ByteBufferUtil.bytes(rawKey), session.getColumnFamilyType() == ColumnFamilyType.Super
                                                                                 ? getSuperColumnsMutationMap(superColumns)
@@ -80,7 +80,7 @@ public class CounterAdder extends Operat
 
             try
             {
-                client.batch_add(record, session.getConsistencyLevel());
+                client.batch_mutate(record, session.getConsistencyLevel());
                 success = true;
             }
             catch (Exception e)
@@ -104,15 +104,15 @@ public class CounterAdder extends Operat
         session.latency.getAndAdd(System.currentTimeMillis() - start);
     }
 
-    private Map<String, List<CounterMutation>> getSuperColumnsMutationMap(List<CounterSuperColumn>
superColumns)
+    private Map<String, List<Mutation>> getSuperColumnsMutationMap(List<CounterSuperColumn>
superColumns)
     {
-        List<CounterMutation> mutations = new ArrayList<CounterMutation>();
-        Map<String, List<CounterMutation>> mutationMap = new HashMap<String,
List<CounterMutation>>();
+        List<Mutation> mutations = new ArrayList<Mutation>();
+        Map<String, List<Mutation>> mutationMap = new HashMap<String, List<Mutation>>();
 
         for (CounterSuperColumn s : superColumns)
         {
             Counter counter = new Counter().setSuper_column(s);
-            mutations.add(new CounterMutation().setCounter(counter));
+            mutations.add(new Mutation().setCounter(counter));
         }
 
         mutationMap.put("SuperCounter1", mutations);
@@ -120,15 +120,15 @@ public class CounterAdder extends Operat
         return mutationMap;
     }
 
-    private Map<String, List<CounterMutation>> getColumnsMutationMap(List<CounterColumn>
columns)
+    private Map<String, List<Mutation>> getColumnsMutationMap(List<CounterColumn>
columns)
     {
-        List<CounterMutation> mutations = new ArrayList<CounterMutation>();
-        Map<String, List<CounterMutation>> mutationMap = new HashMap<String,
List<CounterMutation>>();
+        List<Mutation> mutations = new ArrayList<Mutation>();
+        Map<String, List<Mutation>> mutationMap = new HashMap<String, List<Mutation>>();
 
         for (CounterColumn c : columns)
         {
             Counter counter = new Counter().setColumn(c);
-            mutations.add(new CounterMutation().setCounter(counter));
+            mutations.add(new Mutation().setCounter(counter));
         }
 
         mutationMap.put("Counter1", mutations);



Mime
View raw message