<NME> setup_env.inc
<BEF> # set up the common variables
# may need to consolidate later

# figure out the basedir and voldemort dir
REBALANCE_TEST_DIR=`dirname $0`
REBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`
cd $REBALANCE_TEST_DIR
REBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`

VLDMDIR=`dirname $0`/../../../..
VLDMDIR=`(cd $VLDMDIR && pwd)`
cd $VLDMDIR
VLDMDIR=`(cd $VLDMDIR && pwd)`

cd $REBALANCE_TEST_DIR
TESTCFG_PREFIX=$REBALANCE_TEST_DIR/config/test_config
TESTCFG_DIR=$REBALANCE_TEST_DIR/test_config
ORIGCFG_DIR=$REBALANCE_TEST_DIR/config
WORKDIR=$REBALANCE_TEST_DIR
METADIR=$REBALANCE_TEST_DIR/metadata
TMPCLUSTER=$WORKDIR/tmpcluster
LOGDIR=$WORKDIR/log
DATADIR=$WORKDIR/data
vldm_dir=$VLDMDIR
work_dir=$REBALANCE_TEST_DIR
REMOTEUSER=hadoop
DATASOURCE=/raid10/DONT-REMOVE/test_config
# set up the remote run
# expect remote server to have the same structure
TOTAL_NUM_SERVERS=3
REMOTE_RUN=true
SERVER_MACHINES=(localhost localhost localhost)

REMOTE_RUN=true
TOTAL_NUM_SERVERS=6
TOTAL_OLD_SERVERS=4
# note: list old servers first, then the new servers.
#SERVER_MACHINES=(localhost localhost localhost)
SERVER_MACHINES=(miner12.qa.linkedin.com miner13.qa.linkedin.com miner14.qa.linkedin.com miner15.qa.linkedin.com miner16.qa.linkedin.com miner17.qa.linkedin.com)
SERVER_PORT=(6667 6669 6671 6673 6675 6677)
KILLMODE="STEALER-ONLY"
#KILLMODE="NONE"
GENERATE_CLUSTER="FALSE"

set -x


<MSG> more random select

<DFF> @@ -1,6 +1,7 @@
 # set up the common variables
 # may need to consolidate later
 
+set +x
 # figure out the basedir and voldemort dir
 REBALANCE_TEST_DIR=`dirname $0`
 REBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`
@@ -28,6 +29,7 @@ work_dir=$REBALANCE_TEST_DIR
 # set up the remote run
 # expect remote server to have the same structure
 TOTAL_NUM_SERVERS=3
-REMOTE_RUN=true
-SERVER_MACHINES=(localhost localhost localhost)
+#REMOTE_RUN=true
+#SERVER_MACHINES=(localhost localhost localhost)
+set -x
 

{'commit': 'diff --git a/test/integration/voldemort/rebalance/RandomWaitKillAndVerify.sh b/test/integration/voldemort/rebalance/RandomWaitKillAndVerify.sh\nindex 6edf15dec..0134f7b74 100755\n--- a/test/integration/voldemort/rebalance/RandomWaitKillAndVerify.sh\n+++ b/test/integration/voldemort/rebalance/RandomWaitKillAndVerify.sh\n@@ -1,5 +1,6 @@\n #!/bin/bash\n \n+set -x\n source setup_env.inc\n \n LOGDIR=$WORKDIR/log\n@@ -30,6 +31,8 @@ fi\n # randomly choose servers to kill\n # TODO: kill more than one server\n NUM_SERVERS=3\n+\n+# for now, set it to one can be random\n #NUMS_TO_KILL_OR_SUSPEND=$(($RANDOM%$NUM_SERVERS+1))\n NUMS_TO_KILL_OR_SUSPEND=1\n # the\ndiff --git a/test/integration/voldemort/rebalance/RebalanceBBFail.sh b/test/integration/voldemort/rebalance/RebalanceBBFail.sh\nindex 95c97508c..294998395 100755\n--- a/test/integration/voldemort/rebalance/RebalanceBBFail.sh\n+++ b/test/integration/voldemort/rebalance/RebalanceBBFail.sh\n@@ -17,7 +17,7 @@ rm -rf $TESTCFG_DIR\n cp -rf $ORIGCFG_DIR $TESTCFG_DIR\n for i in 1 2 3; do mkdir -p $TESTCFG_PREFIX$i/config; done\n \n-if [ $1 = "reload" ]\n+if [ "$1" == "reload" ]\n then\n   for i in 1 2 3; do rm -rf $TESTCFG_PREFIX$i/data/*; done\n fi\n@@ -39,7 +39,7 @@ cp $WORKDIR/final-cluster.xml $WORKDIR/$ENDMETADATA\n echo Start all servers\n $WORKDIR/BootstrapAll.sh all\n \n-if [ $1 == "reload" ]\n+if [ "$1" == "reload" ]\n then\n   # populate workload\n   $WORKDIR/initWorkloadGen.sh $2 $3\ndiff --git a/test/integration/voldemort/rebalance/StartServer.sh b/test/integration/voldemort/rebalance/StartServer.sh\nindex 0e7dd8f71..4e22db5e6 100755\n--- a/test/integration/voldemort/rebalance/StartServer.sh\n+++ b/test/integration/voldemort/rebalance/StartServer.sh\n@@ -10,7 +10,7 @@ let CONFIGID=$1+1\n CONFIGFILE=${TESTCFG_PREFIX}"$CONFIGID"\n LOGFILE=${server[$1]}.`date +%H%M%S`\n \n-REMOTE_MACHINE_ID=$CONFIGID\n+REMOTE_MACHINE_ID=$1\n if [ "$REMOTE_RUN" == "true" ]; then\n   export remote_call="ssh ${SERVER_MACHINES[$REMOTE_MACHINE_ID]}"\n else\ndiff --git a/test/integration/voldemort/rebalance/WaitforOutput.sh b/test/integration/voldemort/rebalance/WaitforOutput.sh\nindex 26b1e0e1d..9023ddbc0 100755\n--- a/test/integration/voldemort/rebalance/WaitforOutput.sh\n+++ b/test/integration/voldemort/rebalance/WaitforOutput.sh\n@@ -1,5 +1,6 @@\n #!/bin/bash\n \n+set -x\n if [ "$remote_call" == "" ]; then\n   remote_call=eval\n fi\ndiff --git a/test/integration/voldemort/rebalance/setup_env.inc b/test/integration/voldemort/rebalance/setup_env.inc\nindex ebeb902ee..2f2144043 100644\n--- a/test/integration/voldemort/rebalance/setup_env.inc\n+++ b/test/integration/voldemort/rebalance/setup_env.inc\n@@ -1,6 +1,7 @@\n # set up the common variables\n # may need to consolidate later\n \n+set +x\n # figure out the basedir and voldemort dir\n REBALANCE_TEST_DIR=`dirname $0`\n REBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`\n@@ -28,6 +29,7 @@ work_dir=$REBALANCE_TEST_DIR\n # set up the remote run\n # expect remote server to have the same structure\n TOTAL_NUM_SERVERS=3\n-REMOTE_RUN=true\n-SERVER_MACHINES=(localhost localhost localhost)\n+#REMOTE_RUN=true\n+#SERVER_MACHINES=(localhost localhost localhost)\n+set -x\n \n', 'commit_subject': 'more random select', 'repo_name': 'voldemort/voldemort', 'committer': {'name': 'David Zhang', 'email': 'f17d37eb2a075d9c3c0f9fbb469a333c092dbfbc@dzhang-mn.linkedin.biz', 'time_sec': '1307746494', 'tz_offset': '-420', 'date': {'seconds': '1307746494'}}, 'commit_tree': 'df6f8743f18c0a47cfaafe99742646d99a734196', 'commit_message': 'more random select\n', 'language_name': 'Shell', 'license': 'apache-2.0', 'hunks': '@@ -1,6 +1,7 @@\n # set up the common variables\n # may need to consolidate later\n \n+set +x\n # figure out the basedir and voldemort dir\n REBALANCE_TEST_DIR=`dirname $0`\n REBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`\n@@ -28,6 +29,7 @@ work_dir=$REBALANCE_TEST_DIR\n # set up the remote run\n # expect remote server to have the same structure\n TOTAL_NUM_SERVERS=3\n-REMOTE_RUN=true\n-SERVER_MACHINES=(localhost localhost localhost)\n+#REMOTE_RUN=true\n+#SERVER_MACHINES=(localhost localhost localhost)\n+set -x\n \n', 'addition_count': 4, 'deletion_count': 2, 'src_file': 'a/test/integration/voldemort/rebalance/setup_env.inc', 'tgt_file': 'b/test/integration/voldemort/rebalance/setup_env.inc', 'file_extension': '.inc', 'before_file': '# set up the common variables\n# may need to consolidate later\n\n# figure out the basedir and voldemort dir\nREBALANCE_TEST_DIR=`dirname $0`\nREBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`\ncd $REBALANCE_TEST_DIR\nREBALANCE_TEST_DIR=`(cd $REBALANCE_TEST_DIR&& pwd)`\n\nVLDMDIR=`dirname $0`/../../../..\nVLDMDIR=`(cd $VLDMDIR && pwd)`\ncd $VLDMDIR\nVLDMDIR=`(cd $VLDMDIR && pwd)`\n\ncd $REBALANCE_TEST_DIR\nTESTCFG_PREFIX=$REBALANCE_TEST_DIR/config/test_config\nTESTCFG_DIR=$REBALANCE_TEST_DIR/test_config\nORIGCFG_DIR=$REBALANCE_TEST_DIR/config\nWORKDIR=$REBALANCE_TEST_DIR\nMETADIR=$REBALANCE_TEST_DIR/metadata\nTMPCLUSTER=$WORKDIR/tmpcluster\nLOGDIR=$WORKDIR/log\nDATADIR=$WORKDIR/data\nvldm_dir=$VLDMDIR\nwork_dir=$REBALANCE_TEST_DIR\nREMOTEUSER=hadoop\nDATASOURCE=/raid10/DONT-REMOVE/test_config\n# set up the remote run\n# expect remote server to have the same structure\nTOTAL_NUM_SERVERS=3\nREMOTE_RUN=true\nSERVER_MACHINES=(localhost localhost localhost)\n\nREMOTE_RUN=true\nTOTAL_NUM_SERVERS=6\nTOTAL_OLD_SERVERS=4\n# note: list old servers first, then the new servers.\n#SERVER_MACHINES=(localhost localhost localhost)\nSERVER_MACHINES=(miner12.qa.linkedin.com miner13.qa.linkedin.com miner14.qa.linkedin.com miner15.qa.linkedin.com miner16.qa.linkedin.com miner17.qa.linkedin.com)\nSERVER_PORT=(6667 6669 6671 6673 6675 6677)\nKILLMODE="STEALER-ONLY"\n#KILLMODE="NONE"\nGENERATE_CLUSTER="FALSE"\n\nset -x\n\n', 'message': 'more random select\n', 'author_name': 'David Zhang', 'lang': 'inc'}