You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2016/08/22 02:35:28 UTC
kylin git commit: minor, fix bug in kylin.sh refactor
Repository: kylin
Updated Branches:
refs/heads/master 29ba46bee -> 2ce1cde0a
minor, fix bug in kylin.sh refactor
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2ce1cde0
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2ce1cde0
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2ce1cde0
Branch: refs/heads/master
Commit: 2ce1cde0ab18f1b3541498584543394123f91efb
Parents: 29ba46b
Author: Hongbin Ma <ma...@apache.org>
Authored: Mon Aug 22 10:35:09 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Mon Aug 22 10:35:09 2016 +0800
----------------------------------------------------------------------
build/bin/kylin.sh | 49 +++++++++++++++++--------------------------------
1 file changed, 17 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/2ce1cde0/build/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 88f9296..365e1fe 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -25,9 +25,17 @@ dir="$KYLIN_HOME/bin"
source ${dir}/check-env.sh
mkdir -p ${KYLIN_HOME}/logs
+mkdir -p ${KYLIN_HOME}/ext
+#retrive $hive_dependency and $hbase_dependency
+source ${dir}/find-hive-dependency.sh
+source ${dir}/find-hbase-dependency.sh
+
+#retrive $KYLIN_EXTRA_START_OPTS
+if [ -f "${dir}/setenv.sh" ]
+ then source ${dir}/setenv.sh
+fi
-mkdir -p ${KYLIN_HOME}/ext
export HBASE_CLASSPATH_PREFIX=${KYLIN_HOME}/conf:${KYLIN_HOME}/lib/*:${KYLIN_HOME}/tool/*:${KYLIN_HOME}/ext/*:${HBASE_CLASSPATH_PREFIX}
export HBASE_CLASSPATH=${HBASE_CLASSPATH}:${hive_dependency}
@@ -67,14 +75,6 @@ then
echo "kylin.security.profile is set to $spring_profile"
fi
- #retrive $hive_dependency and $hbase_dependency
- source ${dir}/find-hive-dependency.sh
- source ${dir}/find-hbase-dependency.sh
- #retrive $KYLIN_EXTRA_START_OPTS
- if [ -f "${dir}/setenv.sh" ]
- then source ${dir}/setenv.sh
- fi
-
#additionally add tomcat libs to HBASE_CLASSPATH_PREFIX
export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:${HBASE_CLASSPATH_PREFIX}
@@ -143,16 +143,9 @@ then
fi
if [ "$2" == "start" ]
then
-
- #retrive $hive_dependency and $hbase_dependency
- source ${dir}/find-hive-dependency.sh
- source ${dir}/find-hbase-dependency.sh
+
source ${dir}/find-kafka-dependency.sh
- #retrive $KYLIN_EXTRA_START_OPTS
- if [ -f "${dir}/setenv.sh" ]
- then source ${dir}/setenv.sh
- fi
-
+
# KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
hbase ${KYLIN_EXTRA_START_OPTS} \
-Dlog4j.configuration=kylin-log4j.properties\
@@ -189,27 +182,20 @@ elif [ "$1" == "monitor" ]
then
echo "monitor job"
- #retrive $hive_dependency and $hbase_dependency
- source ${dir}/find-hive-dependency.sh
- source ${dir}/find-hbase-dependency.sh
source ${dir}/find-kafka-dependency.sh
- #retrive $KYLIN_EXTRA_START_OPTS
- if [ -f "${dir}/setenv.sh" ]
- then source ${dir}/setenv.sh
- fi
-
+
# KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
hbase ${KYLIN_EXTRA_START_OPTS} \
-Dlog4j.configuration=kylin-log4j.properties\
-Dkylin.hive.dependency=${hive_dependency} \
- -Dkyiln.kafka.dependency=${kafka_dependency} \
+ -Dkylin.kafka.dependency=${kafka_dependency} \
-Dkylin.hbase.dependency=${hbase_dependency} \
org.apache.kylin.engine.streaming.cli.MonitorCLI $@ > ${KYLIN_HOME}/logs/monitor.log 2>&1
exit 0
elif [ "$1" = "version" ]
then
- exec hbase ${KYLIN_EXTRA_START_OPTS} -Dlog4j.configuration=kylin-log4j.properties org.apache.kylin.common.KylinVersion
+ exec hbase -Dlog4j.configuration=kylin-log4j.properties org.apache.kylin.common.KylinVersion
exit 0
elif [ "$1" = "diag" ]
@@ -220,10 +206,9 @@ then
# tool command
elif [[ "$1" = org.apache.kylin.* ]]
then
- #retrive $hive_dependency and $hbase_dependency
- source ${dir}/find-hive-dependency.sh
- source ${dir}/find-hbase-dependency.sh
- #retrive $KYLIN_EXTRA_START_OPTS
+
+ #retrive $KYLIN_EXTRA_START_OPTS from a separate file called setenv-tool.sh
+ reset KYLIN_EXTRA_START_OPTS # reset the global server setenv config first
if [ -f "${dir}/setenv-tool.sh" ]
then source ${dir}/setenv-tool.sh
fi