Explorar o código

[livy] bin/livy-repl should try to use the SPARK_HOME spark-submit

Erick Tryzelaar %!s(int64=10) %!d(string=hai) anos
pai
achega
e56e54e05c
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      apps/spark/java/bin/livy-repl

+ 7 - 1
apps/spark/java/bin/livy-repl

@@ -23,9 +23,15 @@ set -e
 export LIVY_HOME=$(cd $(dirname $0)/.. && pwd)
 cd $LIVY_HOME
 
+if [ "$SPARK_HOME" ]; then
+	SPARK_SUBMIT="$SPARK_HOME/bin/spark-submit"
+else
+	SPARK_SUBMIT=spark-submit
+fi
+
 source ./bin/setup-classpath
 
-exec spark-submit \
+exec $SPARK_SUBMIT \
 	--driver-java-options "$LIVY_REPL_JAVA_OPTS" \
 	--class com.cloudera.hue.livy.repl.Main \
 	"$ASSEMBLY_JAR" \