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/01/23 09:32:05 UTC

[18/50] [abbrv] incubator-kylin git commit: KYLIN-563 add a kylin.sh

KYLIN-563 add a kylin.sh


Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/391f4859
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/391f4859
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/391f4859

Branch: refs/heads/inverted-index
Commit: 391f48595343a8b5cda124afc15b8920dbc37ebd
Parents: fb3b48b
Author: honma <ho...@ebay.com>
Authored: Thu Jan 22 17:33:14 2015 +0800
Committer: honma <ho...@ebay.com>
Committed: Thu Jan 22 17:33:54 2015 +0800

----------------------------------------------------------------------
 kylin.sh          | 27 +++++++++++++++++++++++++++
 sandbox_deploy.sh |  4 ++--
 2 files changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/391f4859/kylin.sh
----------------------------------------------------------------------
diff --git a/kylin.sh b/kylin.sh
new file mode 100755
index 0000000..61333a7
--- /dev/null
+++ b/kylin.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+if [ -z "$CATALINA_HOME" ]
+then
+    echo "Please set CATALINA_HOME so that Kylin knows where to start tomcat"
+    exit 1
+else
+    echo "CATALINA_HOME is set to $CATALINA_HOME"
+fi
+
+if [ "$1" = "start" ] ; then
+        export HBASE_CLASSPATH_PREFIX=/etc/kylin:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar:${CATALINA_HOME}/lib/*:$HBASE_CLASSPATH_PREFIX
+        hbase -Djava.util.logging.config.file=${CATALINA_HOME}/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 -Dspring.profiles.active=sandbox -Djava.endorsed.dirs=${CATALINA_HOME}/endorsed  -Dcatalina.base=${CATALINA_HOME} -Dcatalina.home=${CATALINA_HOME} -Djava.io.tmpdir=${CATALINA_HOME}/temp  org.apache.hadoop.util.RunJar ${CATALINA_HOME}/bin/bootstrap.jar  org.apache.catalina.startup.Bootstrap start > ${CATALINA_HOME}/logs/kylin_sandbox.log 2>&1 &
+        echo "A new tomcat is started by $USER, stop it using kylin.sh stop"
+        echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
+
+elif [ "$1" = "stop" ]; then
+        # kill all tomcats started by current user
+        ps -fu $USER | grep tomcat | grep -v "grep" | awk '{print $2}' | xargs kill
+        echo "all tomcats started by $USER are killed"
+
+else
+        echo "Usage: kylin.sh start, or kylin.sh stop"
+
+fi
+
+

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/391f4859/sandbox_deploy.sh
----------------------------------------------------------------------
diff --git a/sandbox_deploy.sh b/sandbox_deploy.sh
index 51c5de8..1080256 100755
--- a/sandbox_deploy.sh
+++ b/sandbox_deploy.sh
@@ -181,5 +181,5 @@ hbase -Djava.util.logging.config.file=${CATALINA_HOME}/conf/logging.properties -
     -Djava.library.path=${KYLIN_LD_LIBRARY_PATH} \
     org.apache.hadoop.util.RunJar ${CATALINA_HOME}/bin/bootstrap.jar  org.apache.catalina.startup.Bootstrap start > ${CATALINA_HOME}/logs/kylin_sandbox.log 2>&1 &
 
-echo "Kylin is launched successfully!!!"
-echo "Please visit http://<your_sandbox_ip>:7070/kylin to play with the cubes! (Useranme: ADMIN, Password: KYLIN)"
+echo "Kylin is deployed successfully!!!"
+echo "You need to manually start kylin tomcat by using \"./kylin.sh start\""