File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 4242# Setting SPARK_SCALA_VERSION if not already set.
4343
4444if [ -z " $SPARK_SCALA_VERSION " ]; then
45- SCALA_VERSION1 =2.12
46- SCALA_VERSION2 =2.11
47-
48- ASSEMBLY_DIR1 =" ${SPARK_HOME} /assembly/target/scala-${SCALA_VERSION1 } "
49- ASSEMBLY_DIR2 =" ${SPARK_HOME} /assembly/target/scala-${SCALA_VERSION2 } "
50- if [[ -d " $ASSEMBLY_DIR1 " && -d " $ASSEMBLY_DIR2 " ]]; then
51- echo -e " Presence of build for multiple Scala versions detected( $ASSEMBLY_DIR1 and $ASSEMBLY_DIR2 )." 1>&2
52- echo -e " Remove one of them, or export SPARK_SCALA_VERSION=$SCALA_VERSION1 in load- spark-env.sh." 1>&2
45+ SCALA_VERSION_1 =2.12
46+ SCALA_VERSION_2 =2.11
47+
48+ ASSEMBLY_DIR_1 =" ${SPARK_HOME} /assembly/target/scala-${SCALA_VERSION_1 } "
49+ ASSEMBLY_DIR_2 =" ${SPARK_HOME} /assembly/target/scala-${SCALA_VERSION_2 } "
50+ if [[ -d " $ASSEMBLY_DIR_1 " && -d " $ASSEMBLY_DIR_2 " ]]; then
51+ 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
5353 exit 1
5454 fi
5555
56- if [ -d " $ASSEMBLY_DIR1 " ]; then
57- export SPARK_SCALA_VERSION=$SCALA_VERSION1
56+ if [[ -d " $ASSEMBLY_DIR_1 " ] ]; then
57+ export SPARK_SCALA_VERSION=${SCALA_VERSION_1}
5858 else
59- export SPARK_SCALA_VERSION=$SCALA_VERSION2
59+ export SPARK_SCALA_VERSION=${SCALA_VERSION_2}
6060 fi
6161fi
You can’t perform that action at this time.
0 commit comments