You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by qh...@apache.org on 2015/07/01 10:44:03 UTC
[2/2] incubator-kylin git commit: KYLIN-861
KYLIN-861
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/883accba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/883accba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/883accba
Branch: refs/heads/0.8
Commit: 883accbadee11a3aff81ec53f42335e5e0b5f0a7
Parents: 098f580
Author: qianhao.zhou <qi...@ebay.com>
Authored: Thu Jun 25 15:19:44 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Wed Jul 1 16:43:50 2015 +0800
----------------------------------------------------------------------
bin/cleanup_streaming_files.sh | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/883accba/bin/cleanup_streaming_files.sh
----------------------------------------------------------------------
diff --git a/bin/cleanup_streaming_files.sh b/bin/cleanup_streaming_files.sh
new file mode 100644
index 0000000..6b759ca
--- /dev/null
+++ b/bin/cleanup_streaming_files.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+if [ $# != 1 ]
+then
+ echo 'invalid input' || exit -1
+fi
+
+cd $KYLIN_HOME
+
+for pidfile in `find . -name "$1_1*"`
+do
+ pidfile=`echo "$pidfile" | cut -c 3-`
+ echo "pidfile:$pidfile"
+ pid=`cat $pidfile`
+ if [ `ps -ef | awk '{print $2}' | grep -w $pid | wc -l` = 1 ]
+ then
+ echo "pid:$pid still running"
+ else
+ echo "pid:$pid not running, try to delete files"
+ echo $pidfile | xargs rm
+ echo "logs/streaming_$pidfile.log" | xargs rm
+ fi
+done
+