Author: jbellis Date: Mon May 10 18:53:13 2010 New Revision: 942841 URL: http://svn.apache.org/viewvc?rev=942841&view=rev Log: update stress.py to use batch_mutate api. patch by Stu Hood; reviewed by Brandon Williams for CASSANDRA-1067
Modified: cassandra/trunk/contrib/py_stress/stress.py Modified: cassandra/trunk/contrib/py_stress/stress.py URL: http://svn.apache.org/viewvc/cassandra/trunk/contrib/py_stress/stress.py?rev=942841&r1=942840&r2=942841&view=diff ============================================================================== --- cassandra/trunk/contrib/py_stress/stress.py (original) +++ cassandra/trunk/contrib/py_stress/stress.py Mon May 10 18:53:13 2010 @@ -180,12 +180,12 @@ class Inserter(Operation): for i in self.range: key = fmt % i if 'super' == options.cftype: - cfmap= {'Super1': [ColumnOrSuperColumn(super_column=s) for s in supers]} + cfmap= {key: {'Super1' : [Mutation(ColumnOrSuperColumn(super_column=s)) for s in supers]}} else: - cfmap = {'Standard1': [ColumnOrSuperColumn(column=c) for c in columns]} + cfmap = {key: {'Standard1': [Mutation(ColumnOrSuperColumn(column=c)) for c in columns]}} start = time.time() try: - self.cclient.batch_insert(key, cfmap, ConsistencyLevel.ONE) + self.cclient.batch_mutate(cfmap, ConsistencyLevel.ONE) except KeyboardInterrupt: raise except Exception, e: