Minor, add version info into sample cube

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

Branch: refs/heads/master
Commit: 0d55c3118aeea323fc7d33b05e46288628ab4ab3
Parents: 3177d79
Author: auphyroc99 <454530...@qq.com>
Authored: Mon Sep 18 18:12:22 2017 +0800
Committer: Roger Shi <rogershijich...@gmail.com>
Committed: Mon Sep 18 19:02:01 2017 +0800

----------------------------------------------------------------------
 build/bin/sample.sh                                           | 7 +++++++
 examples/sample_cube/template/cube_desc/kylin_sales_cube.json | 1 +
 .../sample_cube/template/cube_desc/kylin_streaming_cube.json  | 1 +
 3 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/0d55c311/build/bin/sample.sh
----------------------------------------------------------------------
diff --git a/build/bin/sample.sh b/build/bin/sample.sh
index 9545362..ee4aa25 100755
--- a/build/bin/sample.sh
+++ b/build/bin/sample.sh
@@ -88,6 +88,13 @@ cp -rf ${KYLIN_HOME}/sample_cube/template/* 
${KYLIN_HOME}/sample_cube/metadata
 sed -i "s/%default_storage_type%/${default_storage_type}/g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube.json
 sed -i "s/%default_engine_type%/${default_engine_type}/g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube.json
 
+#### Add version info into cubes
+kylin_version_str=`bash ${KYLIN_HOME}/bin/kylin.sh version | grep 
kylin.version`
+kylin_version=${kylin_version_str#*:}
+echo "kylin version is "$kylin_version
+sed -i "s/%default_version%/${kylin_version}/g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube.json
+sed -i "s/%default_version%/${kylin_version}/g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_streaming_cube.json
+
 #### Replace the 'DEFAULT' with kylin.source.hive.database-for-flat-table
 sed -i "s/DEFAULT./$sample_database./g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube.json
 sed -i "s/DEFAULT./$sample_database./g" 
${KYLIN_HOME}/sample_cube/metadata/model_desc/kylin_sales_model.json

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d55c311/examples/sample_cube/template/cube_desc/kylin_sales_cube.json
----------------------------------------------------------------------
diff --git a/examples/sample_cube/template/cube_desc/kylin_sales_cube.json 
b/examples/sample_cube/template/cube_desc/kylin_sales_cube.json
index 34aa536..76fbb0a 100644
--- a/examples/sample_cube/template/cube_desc/kylin_sales_cube.json
+++ b/examples/sample_cube/template/cube_desc/kylin_sales_cube.json
@@ -1,6 +1,7 @@
 {
   "uuid" : "0ef9b7a8-3929-4dff-b59d-2100aadc8dbf",
   "last_modified" : 1451468470824,
+  "version": "%default_version%",
   "name" : "kylin_sales_cube",
   "model_name" : "kylin_sales_model",
   "description" : null,

http://git-wip-us.apache.org/repos/asf/kylin/blob/0d55c311/examples/sample_cube/template/cube_desc/kylin_streaming_cube.json
----------------------------------------------------------------------
diff --git a/examples/sample_cube/template/cube_desc/kylin_streaming_cube.json 
b/examples/sample_cube/template/cube_desc/kylin_streaming_cube.json
index ff7fb25..2bd5584 100644
--- a/examples/sample_cube/template/cube_desc/kylin_streaming_cube.json
+++ b/examples/sample_cube/template/cube_desc/kylin_streaming_cube.json
@@ -1,5 +1,6 @@
 {
   "uuid" : "901ed15e-7769-4c66-b7ae-fbdc971cd092",
+  "version": "%default_version%",
   "name" : "kylin_streaming_cube",
   "description" : "",
   "dimensions" : [ {

Reply via email to