Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.09 KB | None | 0 0
  1. CREATE KEYSPACE killr_video WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
  2.  
  3. CREATE TABLE killr_video.videos (
  4. video_id timeuuid PRIMARY KEY,
  5. avg_rating float,
  6. description text,
  7. genres set<text>,
  8. mpaa_rating text,
  9. release_date timestamp,
  10. release_year int,
  11. title text,
  12. user_id uuid
  13. ) WITH bloom_filter_fp_chance = 0.01
  14. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  15. AND comment = ''
  16. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  17. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  18. AND dclocal_read_repair_chance = 0.1
  19. AND default_time_to_live = 0
  20. AND gc_grace_seconds = 864000
  21. AND max_index_interval = 2048
  22. AND memtable_flush_period_in_ms = 0
  23. AND min_index_interval = 128
  24. AND read_repair_chance = 0.0
  25. AND speculative_retry = '99.0PERCENTILE';
  26.  
  27. CREATE TABLE killr_video.family_videos (
  28. video_id timeuuid PRIMARY KEY,
  29. avg_rating float,
  30. description text,
  31. genres set<text>,
  32. mpaa_rating text,
  33. release_date timestamp,
  34. release_year int,
  35. title text,
  36. user_id uuid
  37. ) WITH bloom_filter_fp_chance = 0.01
  38. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  39. AND comment = ''
  40. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  41. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  42. AND dclocal_read_repair_chance = 0.1
  43. AND default_time_to_live = 0
  44. AND gc_grace_seconds = 864000
  45. AND max_index_interval = 2048
  46. AND memtable_flush_period_in_ms = 0
  47. AND min_index_interval = 128
  48. AND read_repair_chance = 0.0
  49. AND speculative_retry = '99.0PERCENTILE';
  50.  
  51. CREATE TABLE killr_video.videos_by_actor (
  52. actor_name text,
  53. release_year int,
  54. character_name text,
  55. title text,
  56. video_id timeuuid,
  57. PRIMARY KEY (actor_name, release_year)
  58. ) WITH CLUSTERING ORDER BY (release_year ASC)
  59. AND bloom_filter_fp_chance = 0.01
  60. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  61. AND comment = ''
  62. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  63. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  64. AND dclocal_read_repair_chance = 0.1
  65. AND default_time_to_live = 0
  66. AND gc_grace_seconds = 864000
  67. AND max_index_interval = 2048
  68. AND memtable_flush_period_in_ms = 0
  69. AND min_index_interval = 128
  70. AND read_repair_chance = 0.0
  71. AND speculative_retry = '99.0PERCENTILE';
  72.  
  73. CREATE TABLE killr_video.actor (
  74. actor_name text PRIMARY KEY
  75. ) WITH bloom_filter_fp_chance = 0.01
  76. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  77. AND comment = ''
  78. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  79. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  80. AND dclocal_read_repair_chance = 0.1
  81. AND default_time_to_live = 0
  82. AND gc_grace_seconds = 864000
  83. AND max_index_interval = 2048
  84. AND memtable_flush_period_in_ms = 0
  85. AND min_index_interval = 128
  86. AND read_repair_chance = 0.0
  87. AND speculative_retry = '99.0PERCENTILE';
  88.  
  89. CREATE TABLE killr_video.videos_by_two_actors (
  90. actor1 text,
  91. actor2 text,
  92. video_id timeuuid,
  93. release_year int,
  94. title text,
  95. PRIMARY KEY (actor1, actor2, video_id)
  96. ) WITH CLUSTERING ORDER BY (actor2 ASC, video_id ASC)
  97. AND bloom_filter_fp_chance = 0.01
  98. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  99. AND comment = ''
  100. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  101. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  102. AND dclocal_read_repair_chance = 0.1
  103. AND default_time_to_live = 0
  104. AND gc_grace_seconds = 864000
  105. AND max_index_interval = 2048
  106. AND memtable_flush_period_in_ms = 0
  107. AND min_index_interval = 128
  108. AND read_repair_chance = 0.0
  109. AND speculative_retry = '99.0PERCENTILE';
  110.  
  111. CREATE TABLE killr_video.videos_by_year_title (
  112. added_year int,
  113. title text,
  114. video_id timeuuid,
  115. added_date timestamp,
  116. avg_rating float,
  117. description text,
  118. user_id uuid,
  119. PRIMARY KEY (added_year, title, video_id)
  120. ) WITH CLUSTERING ORDER BY (title ASC, video_id ASC)
  121. AND bloom_filter_fp_chance = 0.01
  122. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  123. AND comment = ''
  124. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  125. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  126. AND dclocal_read_repair_chance = 0.1
  127. AND default_time_to_live = 0
  128. AND gc_grace_seconds = 864000
  129. AND max_index_interval = 2048
  130. AND memtable_flush_period_in_ms = 0
  131. AND min_index_interval = 128
  132. AND read_repair_chance = 0.0
  133. AND speculative_retry = '99.0PERCENTILE';
  134.  
  135. CREATE TABLE killr_video.videos_by_tag (
  136. tag text,
  137. title text,
  138. video_id timeuuid,
  139. avg_rating float,
  140. description text,
  141. genres set<text>,
  142. mpaa_rating text,
  143. release_date timestamp,
  144. release_year int,
  145. user_id uuid,
  146. PRIMARY KEY (tag, title, video_id)
  147. ) WITH CLUSTERING ORDER BY (title ASC, video_id ASC)
  148. AND bloom_filter_fp_chance = 0.01
  149. AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
  150. AND comment = ''
  151. AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
  152. AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
  153. AND dclocal_read_repair_chance = 0.1
  154. AND default_time_to_live = 0
  155. AND gc_grace_seconds = 864000
  156. AND max_index_interval = 2048
  157. AND memtable_flush_period_in_ms = 0
  158. AND min_index_interval = 128
  159. AND read_repair_chance = 0.0
  160. AND speculative_retry = '99.0PERCENTILE';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement