Support accumulo's new default ssh behavior (#307)
When using the accumulo-cluster script in 2.1.4-snapshot, all
connections now default to being done via ssh vs a local command.
This change modifies the accumulo commands used to ensure that local
start/stop commands are used so that uno's environment variables are
used by accumulo-env.sh
---------
Co-authored-by: Christopher Tubbs <ctubbsii@apache.org>
diff --git a/bin/impl/commands.sh b/bin/impl/commands.sh
index 4f8ff0f..072f28c 100755
--- a/bin/impl/commands.sh
+++ b/bin/impl/commands.sh
@@ -168,8 +168,10 @@
if [[ -z $tmp ]]; then
if [[ $ACCUMULO_VERSION =~ ^1\..*$ ]]; then
"$ACCUMULO_HOME"/bin/start-all.sh
- else
+ elif [[ $ACCUMULO_VERSION =~ ^2\.[0-1]\.[0-3]$ ]]; then
"$ACCUMULO_HOME"/bin/accumulo-cluster start
+ else
+ "$ACCUMULO_HOME"/bin/accumulo-cluster start --local
fi
else
echo "Accumulo already running at: $tmp"
@@ -228,8 +230,10 @@
if pgrep -f accumulo\\.start >/dev/null; then
if [[ $ACCUMULO_VERSION =~ ^1\..*$ ]]; then
"$ACCUMULO_HOME"/bin/stop-all.sh
- else
+ elif [[ $ACCUMULO_VERSION =~ ^2\.[0-1]\.[0-3]$ ]]; then
"$ACCUMULO_HOME"/bin/accumulo-cluster stop
+ else
+ "$ACCUMULO_HOME"/bin/accumulo-cluster stop --local
fi
fi
diff --git a/bin/impl/run/accumulo.sh b/bin/impl/run/accumulo.sh
index bb3ffea..7910662 100755
--- a/bin/impl/run/accumulo.sh
+++ b/bin/impl/run/accumulo.sh
@@ -28,7 +28,13 @@
"$HADOOP_HOME"/bin/hadoop fs -rm -r /accumulo 2>/dev/null || true
"$ACCUMULO_HOME"/bin/accumulo init --clear-instance-name --instance-name "$ACCUMULO_INSTANCE" --password "$ACCUMULO_PASSWORD"
-"$ACCUMULO_HOME"/bin/accumulo-cluster start
+if [[ $ACCUMULO_VERSION =~ ^1\..*$ ]]; then
+ "$ACCUMULO_HOME"/bin/start-all.sh
+elif [[ $ACCUMULO_VERSION =~ ^2\.[0-1]\.[0-3]$ ]]; then
+ "$ACCUMULO_HOME"/bin/accumulo-cluster start
+else
+ "$ACCUMULO_HOME"/bin/accumulo-cluster start --local
+fi
print_to_console "Apache Accumulo $ACCUMULO_VERSION is running"
print_to_console " * Accumulo Monitor: http://localhost:9995/"