# Keyspace Name
keyspace: demo1
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE demo1;
# Table name
table: sample_test
# The CQL for creating a table you wish to stress (optional if it already exists)
table_definition: |
CREATE TABLE sample_test (
key1 blob PRIMARY KEY,
value1 blob
)
### Column Distribution Specifications ###
columnspec:
- name: hash
size: fixed(96) #domain names are relatively short
- name: body
size: gaussian(100..300) #the body of the blog post can be long
population: uniform(1..10M) #10M possible domains to pick from
Now how do I define another table within the same keyspace? All examples talk about just defining one table. I tried also defining another table definition and its column spec just like above but then I get the following error "com.datastax.driver.core.exceptions.InvalidQueryException: Batch too large"
Unfortunately you cannot. A stress profile can contain only one table_definition
and it can only have one table defined in it. It even verifies that theres only one definition matching the table
declaration. You could try running two instances of the stress tool at same time to get that behavior, its inconvenient but I think its the only workaround available short of writing own benchmark (which is tricky).