Skip to content

Commit

Permalink
Support accumulo's new default ssh behavior (#307)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ddanielr and ctubbsii authored Dec 13, 2024
1 parent bd5e18d commit e8f3ba9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bin/impl/commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ function uno_start_main() {
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"
Expand Down Expand Up @@ -228,8 +230,10 @@ function uno_stop_main() {
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

Expand Down
8 changes: 7 additions & 1 deletion bin/impl/run/accumulo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ trap 'echo "[ERROR] Error occurred at $BASH_SOURCE:$LINENO command: $BASH_COMMAN

"$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/"
Expand Down

0 comments on commit e8f3ba9

Please sign in to comment.