This is an automated email from the ASF dual-hosted git repository. xxyu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push: new a058b41 KYLIN-4687 add unify clean sh to excute some clean shells a058b41 is described below commit a058b414abf5a6dd35b758923a385ce86b2f1058 Author: chuxiao <chux...@didichuxing.com> AuthorDate: Thu Aug 6 13:14:53 2020 +0800 KYLIN-4687 add unify clean sh to excute some clean shells --- build/bin/clean-kylin-dirty-data.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build/bin/clean-kylin-dirty-data.sh b/build/bin/clean-kylin-dirty-data.sh new file mode 100644 index 0000000..c06534e --- /dev/null +++ b/build/bin/clean-kylin-dirty-data.sh @@ -0,0 +1,16 @@ +#!/bin/bash +source $(cd -P -- "$(dirname -- "$0")" && pwd -P)/set-kylin-home.sh $@ + +today=`date +"%Y-%m-%d"` +before7day=`date -d "-7 day" +"%Y-%m-%d"` + +echo "*******************start clean metastore***************************" +${KYLIN_HOME}/bin/metastore.sh clean --delete true --jobThreshold 91 >> ${KYLIN_HOME}/logs/clean-kylin-dirty-data.log.$today 2>&1 + +echo "*******************start clean storage***************************" +${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.tool.StorageCleanupJob --delete true >> ${KYLIN_HOME}/logs/clean-kylin-dirty-data.log.$today 2>&1 +#clean before 7 day log +before7dayfile=${KYLIN_HOME}/logs/clean-kylin-dirty-data.log.$before7day +if [ -f "$before7dayfile" ]; then + rm $before7dayfile +fi