freebsd-ports/databases/cassandra/files/repaircluster.in
Martin Wilke 3e8ac00ab5 - Update to 1.0.8
- extend repaircluster command to take optional keyspace name argument
- improve stop procedure in rc.d script

PR:		165816
Submitted by:	Radim Kolar <hsn@sendmail.cz>
Feature safe:	yes
2012-03-10 17:12:10 +00:00

12 lines
291 B
Bash

#! /bin/sh
set -e
PATH=/bin:/usr/bin:%%LOCALBASE%%/bin:%%PREFIX%%/bin
NODETOOL=%%DATADIR%%/bin/nodetool
if test $# -eq 0; then
echo "$0 <any node in cluster> [keyspace]"
exit 1;
fi
for i in `$NODETOOL -h $1 ring | cut -d ' ' -f 1 | grep -e '^[0-9]'`; do
$NODETOOL -h $i repair $2
done