· 7 years ago · Oct 29, 2018, 09:00 AM
1---
2tags:
3 group: schema
4statements:
5- name: create-keyspace
6 prepared: false
7 statement: |
8 create keyspace if not exists <<KEYSPACE:fallout>>
9 WITH replication = <<replication:{'class': 'SimpleStrategy', 'replication-factor': '1'}>>
10 AND durable_writes = <<durable-writes:true>>;
11- name: create-table
12 prepared: false
13 statement: |
14 CREATE TABLE <<KEYSPACE:fallout>>.blobs (
15 key text,
16 ckey int,
17 blob text,
18 PRIMARY KEY(key, ckey)
19 )
20 WITH compaction = <<compaction:{'class': 'SizeTieredCompactionStrategy'}>>
21 AND compression = <<compression:{'class': 'LZ4Compressor'}>>;
22---
23tags:
24 group: ops.write
25statements:
26 - name: write-blobs
27 prepared: true
28 ratio: <<write-ratio:1>>
29 statement: |
30 insert into <<KEYSPACE:fallout>>.blobs (key, ckey, blob) values (?key, ?ckey, ?blob);
31 bindings:
32 key: Uniform(0, <<key-count:10000000>>); ToString() -> String
33 ckey: Add(1); Uniform(0, <<key-count:100>>) -> int
34 blob: Add(1); AlphaNumericString(<<blob-len:256>>) -> String
35---
36tags:
37 group: ops.read
38statements:
39 - name: read-blobs
40 prepared: true
41 ratio: <<read-ratio:1>>
42 statement: |
43 select * from <<KEYSPACE:fallout>>.blobs where key = ?key and ckey = ?ckey;
44 bindings:
45 bindings:
46 key: Uniform(0, <<key-count:10000000>>); ToString() -> String
47 ckey: Add(1); Uniform(0, <<key-count:100>>) -> int
48 blob: Add(1); AlphaNumericString(<<blob-len:256>>) -> String