kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mahong...@apache.org
Subject incubator-kylin git commit: KYLIN-986 add streaming scripts
Date Tue, 01 Sep 2015 09:49:48 GMT
Repository: incubator-kylin
Updated Branches:
  refs/heads/0.8 bf83339c1 -> 8ae2c0fd2


KYLIN-986 add streaming scripts


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

Branch: refs/heads/0.8
Commit: 8ae2c0fd2d31abb21a2605b0cb853742dd386856
Parents: bf83339
Author: honma <honma@ebay.com>
Authored: Tue Sep 1 17:51:16 2015 +0800
Committer: honma <honma@ebay.com>
Committed: Tue Sep 1 17:51:31 2015 +0800

----------------------------------------------------------------------
 bin/streaming_build.sh   | 17 +++++++++++++++++
 bin/streaming_check.sh   | 12 ++++++++++++
 bin/streaming_fillgap.sh | 10 ++++++++++
 bin/streaming_rolllog.sh | 12 ++++++++++++
 4 files changed, 51 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/8ae2c0fd/bin/streaming_build.sh
----------------------------------------------------------------------
diff --git a/bin/streaming_build.sh b/bin/streaming_build.sh
new file mode 100644
index 0000000..2149ea4
--- /dev/null
+++ b/bin/streaming_build.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+source /etc/profile
+source ~/.bash_profile
+
+STREAMING=$1
+INTERVAL=$2
+DELAY=$3
+MARGIN=$4
+CURRENT_TIME_IN_SECOND=`date +%s`
+CURRENT_TIME=$((CURRENT_TIME_IN_SECOND * 1000))
+START=$(($CURRENT_TIME - CURRENT_TIME%INTERVAL - DELAY))
+END=$(($CURRENT_TIME - CURRENT_TIME%INTERVAL - DELAY + INTERVAL))
+
+ID="$START"_"$END"
+echo "building for ${ID}" >> ${KYLIN_HOME}/logs/build_trace.log
+sh ${KYLIN_HOME}/bin/kylin.sh streaming start ${STREAMING} ${ID} -oneoff true -start ${START}
-end ${END} -streaming ${STREAMING} -margin ${MARGIN}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/8ae2c0fd/bin/streaming_check.sh
----------------------------------------------------------------------
diff --git a/bin/streaming_check.sh b/bin/streaming_check.sh
new file mode 100644
index 0000000..5f70e25
--- /dev/null
+++ b/bin/streaming_check.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+source /etc/profile
+source ~/.bash_profile
+
+receivers=$1
+host=$2
+tablename=$3
+authorization=$4
+projectname=$5
+cubename=$6
+sh ${KYLIN_HOME}/bin/kylin.sh monitor -receivers ${receivers} -host ${host} -tableName ${tablename}
-authorization ${authorization} -cubeName ${cubename} -projectName ${projectname}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/8ae2c0fd/bin/streaming_fillgap.sh
----------------------------------------------------------------------
diff --git a/bin/streaming_fillgap.sh b/bin/streaming_fillgap.sh
new file mode 100644
index 0000000..cecaaa9
--- /dev/null
+++ b/bin/streaming_fillgap.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+source /etc/profile
+source ~/.bash_profile
+
+streaming=$1
+margin=$2
+
+cd ${KYLIN_HOME}
+sh ${KYLIN_HOME}/bin/kylin.sh streaming start ${streaming} fillgap -streaming ${streaming}
-fillGap true -margin ${margin}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/8ae2c0fd/bin/streaming_rolllog.sh
----------------------------------------------------------------------
diff --git a/bin/streaming_rolllog.sh b/bin/streaming_rolllog.sh
new file mode 100644
index 0000000..9380f49
--- /dev/null
+++ b/bin/streaming_rolllog.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+source /etc/profile
+source ~/.bash_profile
+
+KYLIN_LOG_HOME=${KYLIN_HOME}/logs
+cd ${KYLIN_LOG_HOME}
+timestamp=`date +%Y_%m_%d_%H_%M_%S`
+tarfile=logs_archived_at_${timestamp}.tar
+files=`find . ! -name '*.tar' -type f -mtime +1` # keep two days' log
+echo ${files} | xargs tar -cvf ${tarfile}
+echo ${files} | xargs rm
\ No newline at end of file


Mime
View raw message