Skip to content

Instantly share code, notes, and snippets.

@sontek
Created April 22, 2015 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sontek/d6fa3fc1b6d085ad3fa4 to your computer and use it in GitHub Desktop.
Save sontek/d6fa3fc1b6d085ad3fa4 to your computer and use it in GitHub Desktop.
cassandra schema for responses
DESCRIBE schema
CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
CREATE TABLE test.response (
survey_id int,
hour_created int,
respondent_id int,
date_created text,
date_deleted text,
option_id bigint,
option_num bigint,
option_type bigint,
question_id bigint,
tags set<bigint>,
text text,
PRIMARY KEY ((survey_id, hour_created), respondent_id)
) WITH CLUSTERING ORDER BY (respondent_id ASC)
AND bloom_filter_fp_chance = 0.01
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 = 0.0
AND speculative_retry = '99.0PERCENTILE';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment