I am struggling with cassandra-stress. I am looking to tune my C* cluster which is serving applications performing updates and deletes.
I have found no extensive documentation for cassandra-stress that exemplify usage, so it has taken a long time just to get it working with inserts and reads. Since my apps are performing updates and deletes, I need to stress test for that usage.
I have a table as follows:
table: eventsrawtest
table_definition: |
CREATE TABLE stresstest.eventsrawtest (
my_id text,
my_info text,
my_date text,
my_time timestamp,
my_stats bigint,
PRIMARY KEY ((my_id, my_info, my_date), my_time)
) WITH CLUSTERING ORDER BY (node_time DESC)
AND bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99PERCENTILE'
I know this is a lot, but I'm trying to replicate a principal CF used in C* for the apps in question.
Here my_time is a clustering key.
My cassandra-stress queries in the yaml are as follows:
queries:
simple1:
cql: select * from eventsrawtest where my_id = ? and my_info = ? and my_date = ?
fields: samerow # pick selection values from same row in partition
range1:
cql: select * from eventsrawtest where my_id = ? and my_info = ? and my_date = ? and my_time >= ? and my_time <= ?
fields: multirow # pick selection values from same row in partition
update1:
cql: update eventsrawtest set bytes_received = ? where my_id = ? and my_info = ? and my_date = ? and my_time = ?
fields: samerow
update2:
cql: update eventsrawtest set bytes_received = ? where my_id = ? and my_info = ? and my_date = ? and my_time >= ? and my_time <= ?
fields: multirow
When I run cassandra-stress with these queries
cassandra-stress user profile=./my-stress-test.yaml n=1000000 "ops(simple1=1,range1=1,update1=1,update2=1)" no-warmup cl=QUORUM -node 1.db,2.db,3.db -mode native cql3
I get this error for update1 as well as update2
com.datastax.driver.core.exceptions.InvalidQueryException: Slice restrictions are not supported on the clustering columns in UPDATE statements
I am a devops guy new to C*, so that factors into why I don't really understand the error. I have not yet found a clear explanation of why I am getting this error, much less what is the remedial action for it. I need the my_time clustering key in my update query, but otherwise valid queries for my_time just don't work with cassandra-stress.
Any guidance, help, pointers, just something would be very greatly appreciated.