Last active
September 22, 2020 13:18
-
-
Save tzach/429f03ac991e0ff2fa11 to your computer and use it in GitHub Desktop.
cassandra-stress for KairosDB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### DML ### | |
# Keyspace Name | |
keyspace: kairos | |
# The CQL for creating a keyspace (optional if it already exists) | |
keyspace_definition: | | |
CREATE KEYSPACE kairos WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2}; | |
# Table name | |
table: data_points | |
# The CQL for creating a table you wish to stress (optional if it already exists) | |
table_definition: | | |
CREATE TABLE data_points ( | |
key blob, | |
column1 blob, | |
value blob, | |
PRIMARY KEY (key, column1) | |
) WITH COMPACT STORAGE | |
AND CLUSTERING ORDER BY (column1 ASC) | |
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}' | |
AND comment = '' | |
AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'} | |
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'} | |
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 = 1.0 | |
AND speculative_retry = 'NONE' | |
### Column Distribution Specifications ### | |
### Batch Ratio Distribution Specifications ### | |
insert: | |
partitions: fixed(1) | |
select: fixed(1)/1000 | |
batchtype: UNLOGGED | |
# | |
# A list of queries you wish to run against the schema | |
# | |
queries: | |
singlepoint: | |
cql: select * from data_points where key = ? LIMIT 1 | |
fields: samerow | |
# Run stress | |
# ./tools/bin/cassandra-stress user profile=kairosdb-stress.yaml ops\(insert=1\) -rate threads=100 | |
# ./tools/bin/cassandra-stress user profile=kairosdb-stress.yaml ops\(singlepoint=1\) -rate threads=100 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment