accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-3791 Don't collide already defined variable names in agitator scripts
Date Mon, 11 May 2015 00:23:51 GMT
ACCUMULO-3791 Don't collide already defined variable names in agitator scripts


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/2807c144
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/2807c144
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/2807c144

Branch: refs/heads/master
Commit: 2807c144c123fd32d6583729c0d64c5693cf55d1
Parents: 67effa0
Author: Josh Elser <elserj@apache.org>
Authored: Sun May 10 20:21:15 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sun May 10 20:22:50 2015 -0400

----------------------------------------------------------------------
 test/system/continuous/start-agitator.sh | 8 ++++----
 test/system/continuous/stop-agitator.sh  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/2807c144/test/system/continuous/start-agitator.sh
----------------------------------------------------------------------
diff --git a/test/system/continuous/start-agitator.sh b/test/system/continuous/start-agitator.sh
index 2505725..a44cd83 100755
--- a/test/system/continuous/start-agitator.sh
+++ b/test/system/continuous/start-agitator.sh
@@ -34,8 +34,8 @@ mkdir -p "$CONTINUOUS_LOG_DIR"
 LOG_BASE="${CONTINUOUS_LOG_DIR}/$(date +%Y%m%d%H%M%S)_$(hostname)"
 
 # Start agitators for datanodes, tservers, and the master
-[[ -n $USER ]] || USER=$(whoami)
-if [[ $USER == root ]];  then
+[[ -n $AGITATOR_USER ]] || AGITATOR_USER=$(whoami)
+if [[ $AGITATOR_USER == root ]];  then
   echo "Running master-agitator and tserver-agitator as $ACCUMULO_USER using su. Running
datanode-agitator as $HDFS_USER using su."
 
   # Change to the correct user if started as root
@@ -45,8 +45,8 @@ if [[ $USER == root ]];  then
 
   su -c "nohup ${bin}/datanode-agitator.pl $DATANODE_KILL_SLEEP_TIME $DATANODE_RESTART_SLEEP_TIME
$HADOOP_PREFIX $DATANODE_MIN_KILL $DATANODE_MAX_KILL >${LOG_BASE}_datanode-agitator.out
2>${LOG_BASE}_datanode-agitator.err &" -m - "$HDFS_USER"
 
-elif [[ $USER == "$ACCUMULO_USER" ]]; then
-  echo "Running master-agitator and tserver-agitator as $USER Running datanode-agitator as
$HDFS_USER using sudo."
+elif [[ $AGITATOR_USER == "$ACCUMULO_USER" ]]; then
+  echo "Running master-agitator and tserver-agitator as $AGITATOR_USER Running datanode-agitator
as $HDFS_USER using sudo."
   # Just run the master-agitator if we're the accumulo user
   nohup "${bin}/master-agitator.pl" "$MASTER_KILL_SLEEP_TIME" "$MASTER_RESTART_SLEEP_TIME"
>"${LOG_BASE}_master-agitator.out" 2>"${LOG_BASE}_master-agitator.err" &
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/2807c144/test/system/continuous/stop-agitator.sh
----------------------------------------------------------------------
diff --git a/test/system/continuous/stop-agitator.sh b/test/system/continuous/stop-agitator.sh
index 139dde2..d8f30e4 100755
--- a/test/system/continuous/stop-agitator.sh
+++ b/test/system/continuous/stop-agitator.sh
@@ -29,16 +29,16 @@ CONTINUOUS_CONF_DIR=${CONTINUOUS_CONF_DIR:-${bin}}
 . "$CONTINUOUS_CONF_DIR/continuous-env.sh"
 
 # Try to use sudo when we wouldn't normally be able to kill the processes
-[[ -n $USER ]] || USER=$(whoami)
-if [[ $USER == root ]]; then
+[[ -n $AGITATOR_USER ]] || AGITATOR_USER=$(whoami)
+if [[ $AGITATOR_USER == root ]]; then
   echo "Stopping all processes matching 'agitator.pl' as root"
   pkill -f agitator.pl 2>/dev/null
-elif [[ $USER == "$ACCUMULO_USER" ]];  then
+elif [[ $AGITATOR_USER == "$ACCUMULO_USER" ]];  then
   echo "Stopping all processes matching 'datanode-agitator.pl' as $HDFS_USER"
   sudo -u "$HDFS_USER" pkill -f datanode-agitator.pl 2>/dev/null
   echo "Stopping all processes matching 'hdfs-agitator.pl' as $HDFS_USER"
   sudo -u "$HDFS_USER" pkill -f hdfs-agitator.pl 2>/dev/null
-  echo "Stopping all processes matching 'agitator.pl' as $USER"
+  echo "Stopping all processes matching 'agitator.pl' as $AGITATOR_USER"
   pkill -f agitator.pl 2>/dev/null 2>/dev/null
 else
   echo "Stopping all processes matching 'datanode-agitator.pl' as $HDFS_USER"


Mime
View raw message