Skip to content

Commit a9e387f

Browse files
author
Brian Cantoni
committed
DSP-7052: Improve finding location of dse for package installs
1 parent 0a630cd commit a9e387f

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

bin/server_start.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,24 @@ fi
7878
# This needs to be exported for standalone mode so drivers can connect to the Spark cluster
7979
export SPARK_HOME
8080

81-
# DSE_BIN is set in settings.sh
82-
"$DSE_HOME/bin/dse" spark-submit --class "$MAIN" --driver-memory 5G \
81+
# Identify location of dse command
82+
DSE="/usr/bin/dse"
83+
if [ -z "$DSE_HOME" ]; then
84+
if [ -e "$DSE" ]; then
85+
export DSE_HOME=/usr/share/dse
86+
fi
87+
fi
88+
if [ ! -e "$DSE" ]; then
89+
if [ -e "$DSE_HOME"/bin/dse ]; then
90+
DSE="$DSE_HOME"/bin/dse
91+
else
92+
echo "Cannot determine DSE_HOME, please set it manually to your DSE install directory"
93+
exit 1
94+
fi
95+
fi
96+
97+
# Submit the job server
98+
"$DSE" spark-submit --class "$MAIN" --driver-memory 5G \
8399
--conf "spark.executor.extraJavaOptions=$LOGGING_OPTS" \
84100
--driver-java-options "$GC_OPTS $JAVA_OPTS $LOGGING_OPTS $CONFIG_OVERRIDES" \
85101
"$@" "$appdir/spark-job-server.jar" "$conffile" 2>&1 &

0 commit comments

Comments
 (0)