Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9346123
change-cassandra-replication.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
357 B
Subscribers
None
change-cassandra-replication.sh
View Options
#!/bin/bash
REPLICATION_FACTOR
=
$1
if
[
-z
"
${
REPLICATION_FACTOR
}
"
]
;
then
echo
"usage:
$0
<replication factor>"
exit
1
fi
echo
"Changing replication factor"
echo
"ALTER KEYSPACE swh
WITH
replication =
{
'class': 'SimpleStrategy',
'replication_factor': '3'
};
"
|
cqlsh
"
$(
facter
networking.ip
)
"
echo
"Launching repair..."
nodetool
repair
--full
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Jul 4, 3:45 PM (2 w, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3239491
Attached To
rDSNIP Code snippets
Event Timeline
Log In to Comment