From 201e1c4c3b7a81b6c7a493d1dd56bb2e0c1f91bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Wed, 25 Nov 2015 19:15:45 -0500 Subject: [PATCH] ZEPPELIN-464 Display user-friendly message if user tries to run the unbuilt source rather than the binary distribution of Zeppelin --- bin/zeppelin-daemon.sh | 17 +++++++++++------ bin/zeppelin.sh | 19 ++++++++++++------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/bin/zeppelin-daemon.sh b/bin/zeppelin-daemon.sh index 6e080895517..6ab61023aa0 100755 --- a/bin/zeppelin-daemon.sh +++ b/bin/zeppelin-daemon.sh @@ -67,12 +67,17 @@ if [[ -d "${ZEPPELIN_HOME}/zeppelin-server/target/classes" ]]; then ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-server/target/classes" fi -addJarInDir "${ZEPPELIN_HOME}" -addJarInDir "${ZEPPELIN_HOME}/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-zengine/target/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-web/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}" +addEachJarInDir "${ZEPPELIN_HOME}/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-zengine/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-web/target/lib" + +if [[ "${ZEPPELIN_CLASSPATH}" != *"zeppelin-server-"* ]]; then + echo "Please build Zeppelin before running it, or download the binary package." + exit 1 +fi CLASSPATH+=":${ZEPPELIN_CLASSPATH}" diff --git a/bin/zeppelin.sh b/bin/zeppelin.sh index 17950e8bbdd..02bff14ee7d 100755 --- a/bin/zeppelin.sh +++ b/bin/zeppelin.sh @@ -61,12 +61,17 @@ if [[ -d "${ZEPPELIN_HOME}/zeppelin-server/target/classes" ]]; then ZEPPELIN_CLASSPATH+=":${ZEPPELIN_HOME}/zeppelin-server/target/classes" fi -addJarInDir "${ZEPPELIN_HOME}" -addJarInDir "${ZEPPELIN_HOME}/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-zengine/target/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib" -addJarInDir "${ZEPPELIN_HOME}/zeppelin-web/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}" +addEachJarInDir "${ZEPPELIN_HOME}/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-interpreter/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-zengine/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-server/target/lib" +addEachJarInDir "${ZEPPELIN_HOME}/zeppelin-web/target/lib" + +if [[ "${ZEPPELIN_CLASSPATH}" != *"zeppelin-server-"* ]]; then + echo "Please build Zeppelin before running it, or download the binary package." + exit 1 +fi CLASSPATH+=":${ZEPPELIN_CLASSPATH}" @@ -85,4 +90,4 @@ if [[ ! -d "${ZEPPELIN_NOTEBOOK_DIR}" ]]; then $(mkdir -p "${ZEPPELIN_NOTEBOOK_DIR}") fi -$(exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $ZEPPELIN_CLASSPATH_OVERRIDES:$CLASSPATH $ZEPPELIN_SERVER "$@") +$(exec $ZEPPELIN_RUNNER $JAVA_OPTS -cp $CLASSPATH $ZEPPELIN_SERVER "$@")