This is an automated email from the ASF dual-hosted git repository.
DomGarguilo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git
The following commit(s) were added to refs/heads/main by this push:
new 4e13628 Agitator bug fixes/improvments (#321)
4e13628 is described below
commit 4e1362821d5580a67fb889f4c182ce50869cb7b2
Author: Dom G. <[email protected]>
AuthorDate: Tue Sep 22 11:15:40 2026 -0400
Agitator bug fixes/improvments (#321)
---
bin/agitator | 5 +++--
conf/env.sh | 26 +++++++++++++-------------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/bin/agitator b/bin/agitator
index 10a6109..67a9098 100755
--- a/bin/agitator
+++ b/bin/agitator
@@ -20,7 +20,8 @@
bin_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
at_home=$(cd "$(dirname "$bin_dir")" && pwd)
-source "${bin_dir}/build"
+# only 'start' needs env.sh, which exits if the install paths are missing
+[[ $1 == stop ]] || source "${bin_dir}/build"
function print_usage() {
cat <<EOF
@@ -50,7 +51,7 @@ function start_app_agitator() {
local node_to_kill
nodes_to_kill_array=()
local T
- local ENV_VARS="ACCUMULO_HOME=$ACCUMULO_HOME ZOOKEEPER_HOME=$ZOOKEEPER_HOME
HADOOP_HOME=$HADOOP_HOME JAVA_HOME=$JAVA_HOME"
+ local ENV_VARS="ACCUMULO_HOME=$ACCUMULO_HOME ZOOKEEPER_HOME=$ZOOKEEPER_HOME
HADOOP_HOME=$HADOOP_HOME HADOOP_CONF_DIR=$HADOOP_CONF_DIR
HADOOP_LOG_DIR=$HADOOP_LOG_DIR JAVA_HOME=$JAVA_HOME"
if ((num_hosts == 0)); then
echo "ERROR: No hosts were found in env for $app_name"
diff --git a/conf/env.sh b/conf/env.sh
index 92bcf32..7437dc4 100644
--- a/conf/env.sh
+++ b/conf/env.sh
@@ -92,29 +92,29 @@ fi
AGTR_ACCUMULO_USER=$(whoami)
export AGTR_ACCUMULO_USER
# Time (in minutes) between killing Accumulo managers
-export AGTR_MANAGER_KILL_SLEEP_TIME=60
-export AGTR_MANAGER_RESTART_SLEEP_TIME=2
+export AGTR_MANAGER_KILL_SLEEP_TIME="${AGTR_MANAGER_KILL_SLEEP_TIME:-60}"
+export AGTR_MANAGER_RESTART_SLEEP_TIME="${AGTR_MANAGER_RESTART_SLEEP_TIME:-2}"
# Time (in minutes) between killing Accumulo tservers
-export AGTR_TSERVER_KILL_SLEEP_TIME=20
-export AGTR_TSERVER_RESTART_SLEEP_TIME=10
+export AGTR_TSERVER_KILL_SLEEP_TIME="${AGTR_TSERVER_KILL_SLEEP_TIME:-20}"
+export AGTR_TSERVER_RESTART_SLEEP_TIME="${AGTR_TSERVER_RESTART_SLEEP_TIME:-10}"
# Min and max number of Accumulo tservers that the agitator will kill at once
-export AGTR_TSERVER_MIN_KILL=1
-export AGTR_TSERVER_MAX_KILL=1
+export AGTR_TSERVER_MIN_KILL="${AGTR_TSERVER_MIN_KILL:-1}"
+export AGTR_TSERVER_MAX_KILL="${AGTR_TSERVER_MAX_KILL:-1}"
# Amount of time (in minutes) the agitator should sleep before killing
datanodes
-export AGTR_DATANODE_KILL_SLEEP_TIME=20
+export AGTR_DATANODE_KILL_SLEEP_TIME="${AGTR_DATANODE_KILL_SLEEP_TIME:-20}"
# Amount of time (in minutes) the agitator should wait before restarting
datanodes
-export AGTR_DATANODE_RESTART_SLEEP_TIME=10
+export
AGTR_DATANODE_RESTART_SLEEP_TIME="${AGTR_DATANODE_RESTART_SLEEP_TIME:-10}"
# Min and max number of datanodes the agitator will kill at once
-export AGTR_DATANODE_MIN_KILL=1
-export AGTR_DATANODE_MAX_KILL=1
+export AGTR_DATANODE_MIN_KILL="${AGTR_DATANODE_MIN_KILL:-1}"
+export AGTR_DATANODE_MAX_KILL="${AGTR_DATANODE_MAX_KILL:-1}"
# Datanode hosts if different from tservers
#export AGTR_DATANODE_HOSTS="host1 host2"
# HDFS agitation
AGTR_HDFS_USER=$(whoami)
export AGTR_HDFS_USER
-export AGTR_HDFS=false
-export AGTR_HDFS_SLEEP_TIME=10
-export AGTR_HDFS_SUPERUSER=hdfs
+export AGTR_HDFS="${AGTR_HDFS:-false}"
+export AGTR_HDFS_SLEEP_TIME="${AGTR_HDFS_SLEEP_TIME:-10}"
+export AGTR_HDFS_SUPERUSER="${AGTR_HDFS_SUPERUSER:-hdfs}"
export AGTR_HDFS_COMMAND="${HADOOP_HOME}/bin/hdfs"
AGTR_HDFS_SUDO=$(command -v sudo)
export AGTR_HDFS_SUDO