Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE KEYSPACE killr_video WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
- CREATE TABLE killr_video.videos (
- video_id timeuuid PRIMARY KEY,
- avg_rating float,
- description text,
- genres set<text>,
- mpaa_rating text,
- release_date timestamp,
- release_year int,
- title text,
- user_id uuid
- ) WITH bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
- CREATE TABLE killr_video.family_videos (
- video_id timeuuid PRIMARY KEY,
- avg_rating float,
- description text,
- genres set<text>,
- mpaa_rating text,
- release_date timestamp,
- release_year int,
- title text,
- user_id uuid
- ) WITH bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
- CREATE TABLE killr_video.videos_by_actor (
- actor_name text,
- release_year int,
- character_name text,
- title text,
- video_id timeuuid,
- PRIMARY KEY (actor_name, release_year)
- ) WITH CLUSTERING ORDER BY (release_year ASC)
- AND bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
- CREATE TABLE killr_video.actor (
- actor_name text PRIMARY KEY
- ) WITH bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
- CREATE TABLE killr_video.videos_by_two_actors (
- actor1 text,
- actor2 text,
- video_id timeuuid,
- release_year int,
- title text,
- PRIMARY KEY (actor1, actor2, video_id)
- ) WITH CLUSTERING ORDER BY (actor2 ASC, video_id ASC)
- AND bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
- CREATE TABLE killr_video.videos_by_year_title (
- added_year int,
- title text,
- video_id timeuuid,
- added_date timestamp,
- avg_rating float,
- description text,
- user_id uuid,
- PRIMARY KEY (added_year, title, video_id)
- ) WITH CLUSTERING ORDER BY (title ASC, video_id ASC)
- AND bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
- CREATE TABLE killr_video.videos_by_tag (
- tag text,
- title text,
- video_id timeuuid,
- avg_rating float,
- description text,
- genres set<text>,
- mpaa_rating text,
- release_date timestamp,
- release_year int,
- user_id uuid,
- PRIMARY KEY (tag, title, video_id)
- ) WITH CLUSTERING ORDER BY (title ASC, video_id ASC)
- AND bloom_filter_fp_chance = 0.01
- AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
- AND comment = ''
- AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
- 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';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement