Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P8795
pcs.sh
Active
Public
Actions
Authored by
Eevans
on Jul 24 2019, 1:55 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F29860735: raw.txt
Jul 24 2019, 1:55 PM
2019-07-24 13:55:11 (UTC+0)
Subscribers
None
#!/bin/bash
set
-e
KEYSPACES
=(
# enwiki_T_mediaEKhjXRLvi0_47tdHyL7nahpjtY4
# enwiki_T_metadata
# enwiki_T_mobileVuV78NVnWlTWLhDwwr5v2FMH2wA
# enwiki_T_references
# others_T_mediaEKhjXRLvi0_47tdHyL7nahpjtY4
# others_T_metadata
# others_T_mobileVuV78NVnWlTWLhDwwr5v2FMH2wA
# others_T_references
# wikipedia_T_mediaEKhjXRLvi0_47tdHyL7nahpjtY4
# wikipedia_T_metadata
# wikipedia_T_mobileVuV78NVnWlTWLhDwwr5v2FMH2wA
# wikipedia_T_references
others_T_mediaEKhjXRLvi0_47tdHyL7nahpjtY4
others_T_metadata
others_T_mobileVuV78NVnWlTWLhDwwr5v2FMH2wA
others_T_references
)
for
i in
${
KEYSPACES
[@]
}
;
do
cat
<<EOF
create_$i:
statement: |
CREATE KEYSPACE IF NOT EXISTS "$i"
WITH replication = {'class': 'NetworkTopologyStrategy', 'codfw': '3', 'eqiad': '3'} AND durable_writes = true;
create_$i_meta:
statement: |
CREATE TABLE IF NOT EXISTS "$i".meta (
key text PRIMARY KEY,
value text
) WITH bloom_filter_fp_chance = 0.1
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
AND compression = {'chunk_length_in_kb': '32', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
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 = '99PERCENTILE';
create_$i_data:
statement: |
CREATE TABLE IF NOT EXISTS "$i".data (
"_domain" text,
key text,
headers text,
tid timeuuid,
value blob,
PRIMARY KEY (("_domain", 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', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '32', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND crc_check_chance = 1.0
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 = '99PERCENTILE';
EOF
done
Event Timeline
Eevans
edited the content of this paste.
(Show Details)
Jul 24 2019, 1:55 PM
2019-07-24 13:55:11 (UTC+0)
Eevans
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Eevans
changed the title of this paste from
Masterwork From Distant Lands
to
pcs.sh
.
Jul 24 2019, 1:57 PM
2019-07-24 13:57:30 (UTC+0)
Eevans
mentioned this in
T228804: Create keyspaces in Cassandra for PCS endpoints
.
Jul 24 2019, 2:00 PM
2019-07-24 14:00:50 (UTC+0)
Log In to Comment