aboutsummaryrefslogtreecommitdiff
path: root/sbin/stop-history-server.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/stop-history-server.sh')
-rwxr-xr-xsbin/stop-history-server.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/stop-history-server.sh b/sbin/stop-history-server.sh
index 6e60563595..14e3af4be9 100755
--- a/sbin/stop-history-server.sh
+++ b/sbin/stop-history-server.sh
@@ -19,7 +19,8 @@
# Stops the history server on the machine this script is executed on.
-sbin="`dirname "$0"`"
-sbin="`cd "$sbin"; pwd`"
+if [ -z "${SPARK_HOME}" ]; then
+ export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
+fi
-"$sbin"/spark-daemon.sh stop org.apache.spark.deploy.history.HistoryServer 1
+"${SPARK_HOME}/sbin/spark-daemon.sh" stop org.apache.spark.deploy.history.HistoryServer 1