File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,17 @@ if [ -z "${SPARK_HOME}" ]; then
26
26
source " $( dirname " $0 " ) " /find-spark-home
27
27
fi
28
28
29
+ SPARK_ENV_SH=" spark-env.sh"
29
30
if [ -z " $SPARK_ENV_LOADED " ]; then
30
31
export SPARK_ENV_LOADED=1
31
32
32
33
export SPARK_CONF_DIR=" ${SPARK_CONF_DIR:- " ${SPARK_HOME} " / conf} "
33
34
34
- if [ -f " ${SPARK_CONF_DIR} /spark-env.sh" ]; then
35
+ SPARK_ENV_SH=" ${SPARK_CONF_DIR} /${SPARK_ENV_SH} "
36
+ if [[ -f " ${SPARK_ENV_SH} " ]]; then
35
37
# Promote all variable declarations to environment (exported) variables
36
38
set -a
37
- . " ${SPARK_CONF_DIR} /spark-env.sh "
39
+ . ${SPARK_ENV_SH}
38
40
set +a
39
41
fi
40
42
fi
@@ -49,7 +51,7 @@ if [ -z "$SPARK_SCALA_VERSION" ]; then
49
51
ASSEMBLY_DIR_2=" ${SPARK_HOME} /assembly/target/scala-${SCALA_VERSION_2} "
50
52
if [[ -d " $ASSEMBLY_DIR_1 " && -d " $ASSEMBLY_DIR_2 " ]]; then
51
53
echo " Presence of build for multiple Scala versions detected ($ASSEMBLY_DIR_1 and $ASSEMBLY_DIR_2 )." 1>&2
52
- echo " Remove one of them or, export SPARK_SCALA_VERSION=$SCALA_VERSION_1 in ${SPARK_CONF_DIR} /spark-env.sh ." 1>&2
54
+ echo " Remove one of them or, export SPARK_SCALA_VERSION=$SCALA_VERSION_1 in ${SPARK_ENV_SH} ." 1>&2
53
55
exit 1
54
56
fi
55
57
You can’t perform that action at this time.
0 commit comments