This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch document in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/document by this push: new 6b7be30 fix layout in system cube tutorial 6b7be30 is described below commit 6b7be30e1753c62075a1deec5e3caaba4408013d Author: shaofengshi <shaofeng...@apache.org> AuthorDate: Sun Apr 22 14:20:09 2018 +0800 fix layout in system cube tutorial --- website/_docs23/howto/howto_setup_systemcube.md | 47 +++++++++++++------------ 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/website/_docs23/howto/howto_setup_systemcube.md b/website/_docs23/howto/howto_setup_systemcube.md index 52f379b..2bef508 100644 --- a/website/_docs23/howto/howto_setup_systemcube.md +++ b/website/_docs23/howto/howto_setup_systemcube.md @@ -83,42 +83,45 @@ When the system cube is created, we need to build the cube regularly. For example: - ``` - #!/bin/bash +{% highlight Groff markup %} +#!/bin/bash - dir=$(dirname ${0}) - export KYLIN_HOME=${dir}/../ +dir=$(dirname ${0}) +export KYLIN_HOME=${dir}/../ - CUBE=$1 - INTERVAL=$2 - DELAY=$3 - CURRENT_TIME_IN_SECOND=`date +%s` - CURRENT_TIME=$((CURRENT_TIME_IN_SECOND * 1000)) - END_TIME=$((CURRENT_TIME-DELAY)) - END=$((END_TIME - END_TIME%INTERVAL)) +CUBE=$1 +INTERVAL=$2 +DELAY=$3 +CURRENT_TIME_IN_SECOND=`date +%s` +CURRENT_TIME=$((CURRENT_TIME_IN_SECOND * 1000)) +END_TIME=$((CURRENT_TIME-DELAY)) +END=$((END_TIME - END_TIME%INTERVAL)) - ID="$END" - echo "building for ${CUBE}_${ID}" >> ${KYLIN_HOME}/logs/build_trace.log - sh ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.tool.job.CubeBuildingCLI --cube ${CUBE} --endTime ${END} > ${KYLIN_HOME}/logs/system_cube_${CUBE}_${END}.log 2>&1 & - ``` +ID="$END" +echo "building for ${CUBE}_${ID}" >> ${KYLIN_HOME}/logs/build_trace.log +sh ${KYLIN_HOME}/bin/kylin.sh org.apache.kylin.tool.job.CubeBuildingCLI --cube ${CUBE} --endTime ${END} > ${KYLIN_HOME}/logs/system_cube_${CUBE}_${END}.log 2>&1 & + +{% endhighlight %} 2. Then run this shell script regularly For example, add a cron job as follows: - ``` - 0 */2 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_QUERY_DEV 3600000 1200000 +{% highlight Groff markup %} +0 */2 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_QUERY_DEV 3600000 1200000 + +20 */2 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_QUERY_CUBE_DEV 3600000 1200000 - 20 */2 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_QUERY_CUBE_DEV 3600000 1200000 +40 */4 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_QUERY_RPC_DEV 3600000 1200000 - 40 */4 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_QUERY_RPC_DEV 3600000 1200000 +30 */4 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_JOB_DEV 3600000 1200000 - 30 */4 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_JOB_DEV 3600000 1200000 +50 */12 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_JOB_EXCEPTION_DEV 3600000 12000 - 50 */12 * * * sh ${KYLIN_HOME}/bin/system_cube_build.sh KYLIN_HIVE_METRICS_JOB_EXCEPTION_DEV 3600000 12000 - ``` +{% endhighlight %} ## Details of System Cube + ### Common Dimension For all of these cube, admins can query at four time granularities. From higher level to lower, it's as follows: -- To stop receiving notification emails like this one, please contact shaofeng...@apache.org.