#! /bin/sh set -e PATH=/bin:/usr/bin:%%LOCALBASE%%/bin:%%PREFIX%%/bin NODETOOL=%%DATADIR%%/bin/nodetool if test $# -eq 0; then echo "$0 [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