Skip to content

Instantly share code, notes, and snippets.

@brianwawok
Created February 17, 2016 02:52
Show Gist options
  • Save brianwawok/ab4d13b8bf3a9e60219d to your computer and use it in GitHub Desktop.
Save brianwawok/ab4d13b8bf3a9e60219d to your computer and use it in GitHub Desktop.
### DML ### THIS IS UNDER CONSTRUCTION!!!
# Keyspace Name
keyspace: bacon
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE bacon WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3};
# Table name
table: session_data
# The CQL for creating a table you wish to stress (optional if it already exists)
table_definition:
CREATE TABLE session_data (
user_id uuid,
session_id uuid,
dbp list<int>,
end_time timestamp,
relay_fw text,
relay_id uuid,
relay_ip text,
sensor_fw text,
sensor_id uuid,
start_time timestamp,
PRIMARY KEY (user_id, session_id)
);
### Column Distribution Specifications ###
columnspec:
- name: user_id
size: fixed(32)
population: gaussian(1..50000)
- name: session_id
size: fixed(32)
population: gaussian(1..50000)
- name: dbp
size: fixed(4)
population: gaussian(1..5000)
- name: end_time
size: fixed(8)
population: gaussian(1..50000)
- name: relay_fw
size: fixed(64)
population: gaussian(1..10000000)
- name: relay_id
size: fixed(32)
population: gaussian(1..50000)
- name: relay_ip
size: fixed(32)
population: gaussian(1..1000000)
- name: sensor_fw
size: fixed(32)
population: gaussian(1..50000)
- name: sensor_id
size: fixed(32)
population: gaussian(1..50000)
- name: start_time
size: fixed(8)
population: gaussian(1..50000)
### Batch Ratio Distribution Specifications ###
insert:
partitions: fixed(1) # Our partition key is the domain so only insert one per batch
select: fixed(1)/1
batchtype: UNLOGGED # Unlogged batches
#
# A list of queries you wish to run against the schema
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment