Repository: kylin
Updated Branches:
  refs/heads/master 2359a75e3 -> c2ff8c513


KYLIN-1993 use sed instead of envsubst


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

Branch: refs/heads/master
Commit: c2ff8c5135e72cafeae09f20e654d247f9335d5c
Parents: 2359a75
Author: lidongsjtu <lid...@apache.org>
Authored: Thu Sep 22 11:01:39 2016 +0800
Committer: lidongsjtu <lid...@apache.org>
Committed: Thu Sep 22 12:54:03 2016 +0800

----------------------------------------------------------------------
 build/bin/sample.sh                                            | 6 +++---
 .../sample_cube/template/cube_desc/kylin_sales_cube_desc.json  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/c2ff8c51/build/bin/sample.sh
----------------------------------------------------------------------
diff --git a/build/bin/sample.sh b/build/bin/sample.sh
index c915fb4..92caace 100644
--- a/build/bin/sample.sh
+++ b/build/bin/sample.sh
@@ -48,12 +48,12 @@ if [ -z "$default_engine_type" ]; then
     default_engine_type=2
     default_storage_type=2
 fi
-export default_engine_type
-export default_storage_type
 
 mkdir -p ${KYLIN_HOME}/sample_cube/metadata
 cp -rf ${KYLIN_HOME}/sample_cube/template/* ${KYLIN_HOME}/sample_cube/metadata
-envsubst < 
${KYLIN_HOME}/sample_cube/template/cube_desc/kylin_sales_cube_desc.json > 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
+
+sed -i "s/%default_storage_type%/${default_storage_type}/g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
+sed -i "s/%default_engine_type%/${default_engine_type}/g" 
${KYLIN_HOME}/sample_cube/metadata/cube_desc/kylin_sales_cube_desc.json
 
 cd ${KYLIN_HOME}
 hbase org.apache.hadoop.util.RunJar ${job_jar} 
org.apache.kylin.common.persistence.ResourceTool upload 
${KYLIN_HOME}/sample_cube/metadata  || { exit 1; }

http://git-wip-us.apache.org/repos/asf/kylin/blob/c2ff8c51/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json
----------------------------------------------------------------------
diff --git a/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json 
b/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json
index 0953be6..70b1294 100644
--- a/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json
+++ b/examples/sample_cube/template/cube_desc/kylin_sales_cube_desc.json
@@ -176,8 +176,8 @@
   "status_need_notify" : [ ],
   "auto_merge_time_ranges" : null,
   "retention_range" : 0,
-  "engine_type" : ${default_engine_type},
-  "storage_type" : ${default_storage_type},
+  "engine_type" : %default_engine_type%,
+  "storage_type" : %default_storage_type%,
   "override_kylin_properties" : { },
   "partition_date_start" : 1325376000000
 }
\ No newline at end of file

Reply via email to