This is code in the file example.yaml, It is used to perform cassandra-stress testing on the table staff_activites. Actually I want to run 100000 insert operations while stressing, I am able to do it by using the command
./cassandra-stress user profile="../example.yaml" "ops(insert=1)" n=100000
But I want build a workload comprising of multiple tables with diff no. of insert operations , I tried to specify it inside the yaml file, It is showing the error. Command used to run is
./cassandra-stress user profile="../example.yaml" "ops(insert=1)"
The code inside the example.yaml file is below
specname: example
keyspace: example
keyspace_definition: |
CREATE KEYSPACE example WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3};
table: staff_activities
table_definition: |
CREATE TABLE staff_activities (
name text,
when timeuuid,
what text,
PRIMARY KEY(name, when)
)
columnspec:
- name: name
size: uniform(5..10) # The names of the staff members are between 5-10 characters
population: uniform(1..10) # 10 possible staff members to pick from
- name: when
cluster: uniform(20..500) # Staff members do between 20 and 500 events
- name: what
size: normal(10..100,50)
insert:
partitions: fixed(1)
select: fixed(1)/500
batchtype: UNLOGGED
n: 1000 # n=1000 specifies 1000 operations
queries:
events:
cql: select * from staff_activities where name = ?
fields: samerow
latest_event:
cql: select * from staff_activities where name = ? LIMIT 1
fields: samerow
Error faced is
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datacenter: dc1; Host: localhost/127.0.0.1; Rack: rack1
Created schema. Sleeping 1s for propagation.
java.lang.IllegalArgumentException: Unrecognised insert option(s): {n=10}
at org.apache.cassandra.stress.StressProfile.getInsert(StressProfile.java:652)
at org.apache.cassandra.stress.StressProfile.printSettings(StressProfile.java:158)
at org.apache.cassandra.stress.settings.StressSettings.lambda$printSettings$1(StressSettings.java:311)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
at org.apache.cassandra.stress.settings.StressSettings.printSettings(StressSettings.java:311)
at org.apache.cassandra.stress.Stress.run(Stress.java:100)
at org.apache.cassandra.stress.Stress.main(Stress.java:67)