Page MenuHomeSoftware Heritage

change-cassandra-replication.sh
No OneTemporary

change-cassandra-replication.sh

#!/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

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

Event Timeline