def run(self):
        p = SlicePredicate(slice_range=SliceRange('', '', False, columns_per_key))
        values = generate_values()
        parent = ColumnParent('Standard1')
        # the number of rows with a particular value and the number of values we should query for
        expected_per_value = total_keys // len(values)
        valuebegin = self.range[0] // expected_per_value
        valuecount = len(self.range) // expected_per_value
        for valueidx in xrange(valuebegin, valuebegin + valuecount):
            received = 0
            start = fmt % 0
            value = values[len(values) % valueidx]
            expressions = [IndexExpression(column_name='C1', op=IndexOperator.EQ, value=value)]
            while received < expected_per_value:
                clause = IndexClause(start_key=start, count=options.rangecount, expressions=expressions)
                begin = time.time()
                try:
                    r = self.cclient.get_indexed_slices(parent, clause, p, consistency)
                    if not r: raise RuntimeError("No indexed values from offset received:", start)
                except KeyboardInterrupt:
                    raise
                except Exception, e:
                    if options.ignore:
                        print e
                        continue
                    else:
                        raise
                received += len(r)
                # convert max key found back to an integer, and increment it
                start = fmt % (1 + max([int(keyslice.key) for keyslice in r]))
                self.latencies[self.idx] += time.time() - begin
                self.opcounts[self.idx] += 1
                self.keycounts[self.idx] += len(r)
dataset/ETHPy150Open AppScale/appscale/AppDB/cassandra/stress.py/IndexedRangeSlicer.run/swapped operands of `%`