Skip to content

Commit

Permalink
Cleanup minor typos and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
voldemort committed Jul 4, 2013
1 parent cb938a0 commit db82fea
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
15 changes: 7 additions & 8 deletions bin/rebalance-cluster-expansion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
# Argument = -c current_cluster -s current_stores -i interim_cluster -o output dir

# This script uses getopts which means only single character switches are allowed.
# Using getopt would allow for multi charcter switch names but would come at a
# cost of not being cross compatibility.
# Using getopt would allow for multi charcter switch names but would come at a
# cost of not being cross compatible.

# Function to display usage
usage_and_exit() {
Expand All @@ -31,16 +31,16 @@ usage_and_exit() {
Usage: $0 options
OPTIONS:
-h Show this message
-c Current Cluster that desribes the cluster
-s Current Stores that desribes the store. If you do not have info about the stores yet, look
-c Current cluster that describes the cluster
-s Current stores that describes the store. If you do not have info about the stores yet, look
under 'voldemort_home/config/tools/' for some store examples.
-i Interim Cluster that corresponds to cluster expansion.
-o Output dir where all interim and final files will be stored.
EOF
exit 1
}

# Initiliaze varibles to an empty string
# initialize variables to an empty string
current_cluster=""
current_stores=""
interim_cluster=""
Expand Down Expand Up @@ -106,12 +106,11 @@ fi
# The final cluster.xml for cluster expansion is generated in two steps.
# Step 1: Current cluster.xml is fed to the repartitioner along with the interim cluster xml.
# The repartitioner tries to balance the ring by moving the partitions around.
# Step 2: A plan is generated on how to reach from the orignal cluster topology to
# Step 2: A plan is generated on how to reach from the original cluster topology to
# the one that is generated in step 1.
#
swap_attempts=10
attempts=2

attempts=50

# Step 1
mkdir -p $output_dir/step1/
Expand Down
8 changes: 4 additions & 4 deletions bin/rebalance-new-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# This script uses getopts which means only single character switches are allowed.
# Using getopt would allow for multi charcter switch names but would come at a
# cost of not being cross compatibility.
# cost of not being cross compatible.

# Function to display usage
usage_and_exit() {
Expand All @@ -31,16 +31,16 @@ usage_and_exit() {
Usage: $0 options
OPTIONS:
-h Show this message
-c Current Cluster that desribes the cluster.
-s Current Stores that desribes the store. If you do not have info about the stores yet, look
-c Current cluster that describes the cluster.
-s Current stores that describes the store. If you do not have info about the stores yet, look
under 'voldemort_home/config/tools/' for some store examples.
-o Output dir where all interim and final files will be stored.
The directory will be created if it does not exist yet.
EOF
exit 1
}

# initialize varibles to an empty string
# initialize variables to an empty string
current_cluster=""
current_stores=""
output_dir=""
Expand Down
19 changes: 13 additions & 6 deletions bin/rebalance-shuffle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@
# Argument = -c current_cluster -s current_stores -o output dir
# The final cluster is placed in output_dir/

# This script can be used again on its own output. That is, if first attempt only gets you half-way
# to where you want to go in terms of repartitioning, then take output final-cluster xml and use as
# input to this tool again.
#

# This script uses getopts which means only single character switches are allowed.
# Using getopt would allow for multi charcter switch names but would come at a
# cost of not being cross compatibility.
# cost of not being cross compatible.

# Function to display usage
usage_and_exit() {
Expand All @@ -34,16 +39,16 @@ usage_and_exit() {
Usage: $0 options
OPTIONS:
-h Show this message
-c Current Cluster that desribes the cluster.
-s Current Stores that desribes the store. If you do not have info about the stores yet, look
-c Current cluster that describes the cluster.
-s Current stores that describes the store. If you do not have info about the stores yet, look
under 'voldemort_home/config/tools/' for some store examples.
-o Output dir where all interim and final files will be stored.
The directory will be created if it does not exist yet.
EOF
exit 1
}

# initialize varibles to an empty string
# initialize variables to an empty string
current_cluster=""
current_stores=""
output_dir=""
Expand Down Expand Up @@ -102,8 +107,9 @@ fi
# Step 2: A plan is generated on how to reach from the orignal cluster topology to
# the one that is generated in step 1.
#
swap_attempts=1000
attempts=5
swap_attempts=250
attempts=10
swap_successes=250

# Step 1
mkdir -p $output_dir/step1
Expand All @@ -114,6 +120,7 @@ $vold_home/bin/run-class.sh voldemort.tools.RepartitionerCLI \
--enable-random-swaps \
--attempts $attempts \
--random-swap-attempts $swap_attempts \
--random-swap-successes $swap_successes

if [ ! -e $output_dir/step1/final-cluster.xml ]; then
usage_and_exit "File '$final-cluster.xml' does not exist."
Expand Down
10 changes: 5 additions & 5 deletions bin/rebalance-zone-expansion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
# -o output dir

# This script uses getopts which means only single character switches are allowed.
# Using getopt would allow for multi charcter switch names but would come at a
# cost of not being cross compatibility.
# Using getopt would allow for multi charcter switch names but would come at a
# cost of not being cross compatible.

# Function to display usage
usage_and_exit() {
Expand All @@ -32,8 +32,8 @@ usage_and_exit() {
Usage: $0 options
OPTIONS:
-h Show this message
-c Current Cluster that desribes the cluster
-s Current Stores that desribes the store. If you do not have info about the stores yet, look
-c Current cluster that describes the cluster
-s Current stores that describes the store. If you do not have info about the stores yet, look
under 'voldemort_home/config/tools/' for some store examples.
-i Interim Cluster that corresponds to zone expansion.
-f Final Stores that corresponds to zone expansion.
Expand All @@ -42,7 +42,7 @@ EOF
exit 1
}

# initiliaze varibles to an empty string
# initialize variables to an empty string
current_cluster=""
current_stores=""
interim_cluster=""
Expand Down

0 comments on commit db82fea

Please sign in to comment.