You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/03/14 01:02:23 UTC
[11/47] incubator-kylin git commit: fix script
fix script
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/4a59d38f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/4a59d38f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/4a59d38f
Branch: refs/heads/master
Commit: 4a59d38ff67407e38521f6ab7061b10ca2c57df4
Parents: 3d3e312
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Mar 6 14:09:08 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Mar 6 14:09:08 2015 +0800
----------------------------------------------------------------------
bin/kylin.sh | 76 +++++++++++++++++++++++++++++++++++++++++++++++++
bin/start-kylin.sh | 55 -----------------------------------
bin/stop-kylin.sh | 21 --------------
3 files changed, 76 insertions(+), 76 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4a59d38f/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/bin/kylin.sh b/bin/kylin.sh
new file mode 100644
index 0000000..4efaf9e
--- /dev/null
+++ b/bin/kylin.sh
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+if [ $1 == "start" ]
+then
+ dir=$(dirname ${0})
+ source ${dir}/check-env.sh
+ tomcat_root=${dir}/../tomcat
+ export tomcat_root
+
+ #if [ ! -z "$KYLIN_LD_LIBRARY_PATH" ]
+ #then
+ # echo "KYLIN_LD_LIBRARY_PATH is set to $KYLIN_LD_LIBRARY_PATH"
+ #else
+ # exit 1
+ #fi
+
+ #The location of all hadoop/hbase configurations are difficult to get.
+ #Plus, some of the system properties are secretly set in hadoop/hbase shell command.
+ #For example, in hdp 2.2, there is a system property called hdp.version,
+ #which we cannot get until running hbase or hadoop shell command.
+ #
+ #To save all these troubles, we use hbase runjar to start tomcat.
+ #In this way we no longer need to explicitly configure hadoop/hbase related classpath for tomcat,
+ #hbase command will do all the dirty tasks for us:
+
+ #-Djava.library.path=${KYLIN_LD_LIBRARY_PATH} \
+
+
+ useSandbox=`cat ${KYLIN_HOME}/conf/kylin.properties | grep 'kylin.sandbox' | awk -F '=' '{print $2}'`
+ spring_profile="default"
+ if [ "$useSandbox" = "true" ]
+ then spring_profile="sandbox"
+ fi
+ source ${dir}/find-hive-dependency.sh
+
+ export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
+ export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}
+
+ hbase -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
+ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+ -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
+ -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
+ -Djava.endorsed.dirs=${tomcat_root}/endorsed \
+ -Dcatalina.base=${tomcat_root} \
+ -Dcatalina.home=${tomcat_root} \
+ -Djava.io.tmpdir=${tomcat_root}/temp \
+ -Dkylin.hive.dependency=${hive_dependency} \
+ -Dspring.profiles.active=${spring_profile} \
+ org.apache.hadoop.util.RunJar ${tomcat_root}/bin/bootstrap.jar org.apache.catalina.startup.Bootstrap start > ${tomcat_root}/logs/kylin.log 2>&1 & echo $! > ${KYLIN_HOME}/pid &
+ echo "A new Kylin instance is started by $USER, stop it using \"stop-kylin.sh\""
+ if [ "$useSandbox" = "true" ]
+ then echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
+ else
+ echo "Please visit http://<ip>:7070/kylin"
+ fi
+ echo "You can check the log at ${tomcat_root}/logs/kylin.log"
+elif [ $1 == "stop" ]
+then
+ if [ ! -f "${KYLIN_HOME}/pid" ]
+ then
+ echo "kylin is not running, please check"
+ exit 1
+ fi
+ pid=`cat ${KYLIN_HOME}/pid`
+ if [ "$pid" = "" ]
+ then
+ echo "kylin is not running, please check"
+ exit 1
+ else
+ echo "stopping kylin:$pid"
+ kill $pid
+ fi
+ rm ${KYLIN_HOME}/pid
+else
+ echo "usage: kylin.sh start or kylin.sh stop"
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4a59d38f/bin/start-kylin.sh
----------------------------------------------------------------------
diff --git a/bin/start-kylin.sh b/bin/start-kylin.sh
deleted file mode 100644
index 70cbb62..0000000
--- a/bin/start-kylin.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-dir=$(dirname ${0})
-source ${dir}/check-env.sh
-
-tomcat_root=${dir}/../tomcat
-export tomcat_root
-
-#if [ ! -z "$KYLIN_LD_LIBRARY_PATH" ]
-#then
-# echo "KYLIN_LD_LIBRARY_PATH is set to $KYLIN_LD_LIBRARY_PATH"
-#else
-# exit 1
-#fi
-
-#The location of all hadoop/hbase configurations are difficult to get.
-#Plus, some of the system properties are secretly set in hadoop/hbase shell command.
-#For example, in hdp 2.2, there is a system property called hdp.version,
-#which we cannot get until running hbase or hadoop shell command.
-#
-#To save all these troubles, we use hbase runjar to start tomcat.
-#In this way we no longer need to explicitly configure hadoop/hbase related classpath for tomcat,
-#hbase command will do all the dirty tasks for us:
-
-#-Djava.library.path=${KYLIN_LD_LIBRARY_PATH} \
-
-
-useSandbox=`cat ${KYLIN_HOME}/conf/kylin.properties | grep 'kylin.sandbox' | awk -F '=' '{print $2}'`
-spring_profile="default"
-if [ "$useSandbox" = "true" ]
- then spring_profile="sandbox"
-fi
-source ${dir}/find-hive-dependency.sh
-
-export HBASE_CLASSPATH_PREFIX=${tomcat_root}/bin/bootstrap.jar:${tomcat_root}/bin/tomcat-juli.jar:${tomcat_root}/lib/*:$HBASE_CLASSPATH_PREFIX
-export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}
-
-hbase -Djava.util.logging.config.file=${tomcat_root}/conf/logging.properties \
--Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
--Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
--Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
--Djava.endorsed.dirs=${tomcat_root}/endorsed \
--Dcatalina.base=${tomcat_root} \
--Dcatalina.home=${tomcat_root} \
--Djava.io.tmpdir=${tomcat_root}/temp \
--Dkylin.hive.dependency=${hive_dependency} \
--Dspring.profiles.active=${spring_profile} \
-org.apache.hadoop.util.RunJar ${tomcat_root}/bin/bootstrap.jar org.apache.catalina.startup.Bootstrap start > ${tomcat_root}/logs/kylin.log 2>&1 & echo $! > ${KYLIN_HOME}/pid &
-echo "A new Kylin instance is started by $USER, stop it using \"stop-kylin.sh\""
-if [ "$useSandbox" = "true" ]
- then echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
-else
- echo "Please visit http://<ip>:7070/kylin"
-fi
-echo "You can check the log at ${tomcat_root}/logs/kylin.log"
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/4a59d38f/bin/stop-kylin.sh
----------------------------------------------------------------------
diff --git a/bin/stop-kylin.sh b/bin/stop-kylin.sh
deleted file mode 100644
index dad0a83..0000000
--- a/bin/stop-kylin.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-dir=$(dirname ${0})
-source ${dir}/check-env.sh
-
-if [ ! -f "${KYLIN_HOME}/pid" ]
-then
- echo "no pid found"
- exit 1
-fi
-
-pid=`cat ${KYLIN_HOME}/pid`
-if [ "$pid" = "" ]
-then
- echo "pid is empty"
- exit 1
-else
- echo "stopping kylin:$pid"
- kill $pid
-fi
-rm ${KYLIN_HOME}/pid