You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2015/04/02 15:26:23 UTC
incubator-zeppelin git commit: [ZEPPELIN-13] ZEPPELIN_CONF_DIR cannot
be reached until ZEPPELIN_CONF_DIR become set
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master eeeff235b -> c335c6e88
[ZEPPELIN-13] ZEPPELIN_CONF_DIR cannot be reached until ZEPPELIN_CONF_DIR become set
bin/common.sh tries to find and set ZEPPELIN_CONF_DIR in order to read zeppelin-env.sh, but ZEPPELIN_CONF_DIR is defined in zeppelin-env.sh, so we cannot use different ZEPPELIN_CONF_DIR.
Author: Jongyoul Lee <jo...@gmail.com>
Closes #20 from jongyoul/ZEPPELIN-13 and squashes the following commits:
f998c4e [Jongyoul Lee] [ZEPPELIN-13] ZEPPELIN_CONF_DIR cannot be reached until ZEPPELIN_CONF_DIR become set - Fixed wrong if statements
6490755 [Jongyoul Lee] [ZEPPELIN-13] ZEPPELIN_CONF_DIR cannot be reached until ZEPPELIN_CONF_DIR become set - Fix the orders of checking configuration between zeppelin-daemon.sh and zeppelin.sh
a61d28a [Jongyoul Lee] [ZEPPELIN-13] ZEPPELIN_CONF_DIR cannot be reached until ZEPPELIN_CONF_DIR become set - Reverted note.json
29619d3 [Jongyoul Lee] [ZEPPELIN-13] ZEPPELIN_CONF_DIR cannot be reached until ZEPPELIN_CONF_DIR become set - Added option of --config on zeppelin{-daemon}.sh - Removed ZEPPELIN_CONF_DIR from zeppelin-env.sh
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/c335c6e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/c335c6e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/c335c6e8
Branch: refs/heads/master
Commit: c335c6e886b3b210ec36e68add672608af99b8f4
Parents: eeeff23
Author: Jongyoul Lee <jo...@gmail.com>
Authored: Wed Apr 1 11:12:59 2015 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Thu Apr 2 22:26:18 2015 +0900
----------------------------------------------------------------------
bin/zeppelin-daemon.sh | 19 ++++++++++++++++++-
bin/zeppelin.sh | 17 ++++++++++++++++-
conf/zeppelin-env.sh.template | 1 -
3 files changed, 34 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/c335c6e8/bin/zeppelin-daemon.sh
----------------------------------------------------------------------
diff --git a/bin/zeppelin-daemon.sh b/bin/zeppelin-daemon.sh
index 88f9dca..e4cd4b8 100755
--- a/bin/zeppelin-daemon.sh
+++ b/bin/zeppelin-daemon.sh
@@ -21,6 +21,23 @@
# description: Start and stop daemon script for.
#
+USAGE="Usage: zeppelin-daemon.sh [--config <conf-dir>] {start|stop|restart|reload|status}"
+
+if [ "$1" == "--config" ]
+then
+ shift
+ conf_dir="$1"
+ if [ ! -d "$conf_dir" ]
+ then
+ echo "ERROR : $conf_dir is not a directory"
+ echo ${USAGE}
+ exit 1
+ else
+ export ZEPPELIN_CONF_DIR="$conf_dir"
+ fi
+ shift
+fi
+
if [ -L ${BASH_SOURCE-$0} ]; then
BIN=$(dirname $(readlink "${BASH_SOURCE-$0}"))
else
@@ -205,5 +222,5 @@ case "${1}" in
find_zeppelin_process
;;
*)
- echo "Usage: $0 {start|stop|restart|reload|status}"
+ echo ${USAGE}
esac
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/c335c6e8/bin/zeppelin.sh
----------------------------------------------------------------------
diff --git a/bin/zeppelin.sh b/bin/zeppelin.sh
index a4d71a0..e634fe1 100755
--- a/bin/zeppelin.sh
+++ b/bin/zeppelin.sh
@@ -22,10 +22,25 @@
#
function usage() {
- echo "Usage: bin/zeppelin.sh [spark options] [application options]"
+ echo "Usage: bin/zeppelin.sh [--config <conf-dir>] [spark options] [application options]"
exit 0
}
+if [ "$1" == "--config" ]
+then
+ shift
+ conf_dir="$1"
+ if [ ! -d "$conf_dir" ]
+ then
+ echo "ERROR : $conf_dir is not a directory"
+ echo ${USAGE}
+ exit 1
+ else
+ export ZEPPELIN_CONF_DIR="$conf_dir"
+ fi
+ shift
+fi
+
bin=$(dirname "${BASH_SOURCE-$0}")
bin=$(cd "${bin}">/dev/null; pwd)
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/c335c6e8/conf/zeppelin-env.sh.template
----------------------------------------------------------------------
diff --git a/conf/zeppelin-env.sh.template b/conf/zeppelin-env.sh.template
index ae473c8..365d492 100644
--- a/conf/zeppelin-env.sh.template
+++ b/conf/zeppelin-env.sh.template
@@ -7,7 +7,6 @@
# export ZEPPELIN_INTP_MEM # zeppelin interpreter process jvm mem options. Defualt = ZEPPELIN_MEM
# export ZEPPELIN_INTP_JAVA_OPTS # zeppelin interpreter process jvm options. Default = ZEPPELIN_JAVA_OPTS
-# export ZEPPELIN_CONF_DIR # Alternate zeppelin conf dir. Default is ${ZEPPELIN_HOME}/conf.
# export ZEPPELIN_LOG_DIR # Where log files are stored. PWD by default.
# export ZEPPELIN_PID_DIR # The pid files are stored. /tmp by default.
# export ZEPPELIN_NOTEBOOK_DIR # Where notebook saved