Skip to content

Instantly share code, notes, and snippets.

View redsfyre's full-sized avatar
:shipit:
There is nothing here -> /dev/null

Yasin İsa YILDIRIM redsfyre

:shipit:
There is nothing here -> /dev/null
View GitHub Profile
@cdimartino
cdimartino / rebalance.sh
Created May 16, 2013 20:30
Quick and dirty rebalancing of Cassandra cluster.
#!/bin/sh
# This will allow you to rebalance the Cassandra ring
#
# $ ./rebalance.sh file_of_hosts
RING_SIZE=$(echo "2^127" | bc)
HOSTS=$(cat $1 | sed 'N;s/\n/ /')
HOST_NUM=$(echo $HOSTS | wc -w)
INDEX=0