Skip to content

Commit

Permalink
ZEPPELIN-383 Override classpath with ZEPPELIN_CLASSPATH_OVERRIDES
Browse files Browse the repository at this point in the history
Prepend ZEPPELIN_CLASSPATH_OVERRIDES environment variable when building CLASSPATH in the shell scripts.

This PR replaces the closed  ZEPL#398 and #386 - Sorry for the mess...

Author: Eric Charles <eric@datalayer.io>

Closes #412 from echarles/ZEPPELIN-383-CLASSPATH_OVERRIDES and squashes the following commits:

8572ec5 [Eric Charles] Use ZEPPELIN_CLASSPATH_OVERRIDES instead of CLASSPATH_OVERRIDES
d63cc55 [Eric Charles] Prepend CLASSPATH_OVERRIDES environment variable when building CLASSPATH in the shell scripts
  • Loading branch information
echarles authored and Leemoonsoo committed Nov 12, 2015
1 parent 082eae1 commit 748533b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/interpreter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ fi
CLASSPATH+=":${ZEPPELIN_CLASSPATH}"

if [[ -n "${SPARK_SUBMIT}" ]]; then
${SPARK_SUBMIT} --class ${ZEPPELIN_SERVER} --driver-class-path "${CLASSPATH}" --driver-java-options "${JAVA_INTP_OPTS}" ${SPARK_SUBMIT_OPTIONS} ${SPARK_APP_JAR} ${PORT} &
${SPARK_SUBMIT} --class ${ZEPPELIN_SERVER} --driver-class-path "${ZEPPELIN_CLASSPATH_OVERRIDESS}:${CLASSPATH}" --driver-java-options "${JAVA_INTP_OPTS}" ${SPARK_SUBMIT_OPTIONS} ${SPARK_APP_JAR} ${PORT} &
else
${ZEPPELIN_RUNNER} ${JAVA_INTP_OPTS} -cp ${CLASSPATH} ${ZEPPELIN_SERVER} ${PORT} &
${ZEPPELIN_RUNNER} ${JAVA_INTP_OPTS} -cp ${ZEPPELIN_CLASSPATH_OVERRIDESS}:${CLASSPATH} ${ZEPPELIN_SERVER} ${PORT} &
fi

pid=$!
Expand Down
2 changes: 1 addition & 1 deletion bin/zeppelin-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function start() {

initialize_default_directories

nohup nice -n $ZEPPELIN_NICENESS $ZEPPELIN_RUNNER $JAVA_OPTS -cp $CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}" 2>&1 < /dev/null &
nohup nice -n $ZEPPELIN_NICENESS $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_MAIN >> "${ZEPPELIN_OUTFILE}" 2>&1 < /dev/null &
pid=$!
if [[ -z "${pid}" ]]; then
action_msg "${ZEPPELIN_NAME} start" "${SET_ERROR}"
Expand Down
2 changes: 1 addition & 1 deletion bin/zeppelin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ if [[ ! -d "${ZEPPELIN_NOTEBOOK_DIR}" ]]; then
$(mkdir -p "${ZEPPELIN_NOTEBOOK_DIR}")
fi

$(exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $CLASSPATH $ZEPPELIN_SERVER "$@")
$(exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_SERVER "$@")

0 comments on commit 748533b

Please sign in to comment.