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/28 01:05:20 UTC

[43/50] incubator-kylin git commit: add streaming shell

add streaming shell


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

Branch: refs/heads/streaming-localdict
Commit: d72f2e679571d6b6ba5baade8b49f6c15b9adcf8
Parents: a36d416
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Mar 27 17:07:10 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Mar 27 17:07:10 2015 +0800

----------------------------------------------------------------------
 bin/kylin.sh | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/d72f2e67/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/bin/kylin.sh b/bin/kylin.sh
index 179fa47..95568e1 100644
--- a/bin/kylin.sh
+++ b/bin/kylin.sh
@@ -76,6 +76,32 @@ then
     fi
     rm ${KYLIN_HOME}/pid
     exit 0
+elif [ $1 == "streaming" ]
+then
+    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
+
+    #retrive $hive_dependency
+    source ${dir}/find-hive-dependency.sh
+    #retrive $KYLIN_EXTRA_START_OPTS
+    if [ -f "${dir}/setenv.sh" ]
+        then source ${dir}/setenv.sh
+    fi
+
+    export HBASE_CLASSPATH=$hive_dependency:${HBASE_CLASSPATH}
+    export JAVA_OPTS="-Xms2048M -Xmx2048M"
+
+    hbase ${KYLIN_EXTRA_START_OPTS} \
+    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+    -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
+    -Dkylin.hive.dependency=${hive_dependency} \
+    -Dspring.profiles.active=${spring_profile} \
+    org.apache.hadoop.util.RunJar ${KYLIN_HOME}/lib/kylin-job-*.jar org.apache.kylin.job.streaming.StreamingCLI start $2 > ${tomcat_root}/logs/kylin.log 2>&1 & echo $! > ${KYLIN_HOME}/$2 &
+    echo "streaming started $2"
+    exit 0
 else
     echo "usage: kylin.sh start or kylin.sh stop"
     exit 1