kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject kylin git commit: KYLIN-1795: fix sample.sh when using beeline
Date Fri, 22 Jul 2016 02:36:05 GMT
Repository: kylin
Updated Branches:
  refs/heads/master 36eec4122 -> 3bdafb1a1


KYLIN-1795: fix sample.sh when using beeline

Signed-off-by: shaofengshi <shaofengshi@apache.org>


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

Branch: refs/heads/master
Commit: 3bdafb1a118a03222c30c97d0af79f4a8c811930
Parents: 36eec41
Author: Yiming Liu <liuyiming.vip@gmail.com>
Authored: Fri Jul 22 09:36:24 2016 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Fri Jul 22 10:35:50 2016 +0800

----------------------------------------------------------------------
 build/bin/sample.sh                           | 8 +++++++-
 examples/sample_cube/create_sample_tables.sql | 6 +++---
 2 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/3bdafb1a/build/bin/sample.sh
----------------------------------------------------------------------
diff --git a/build/bin/sample.sh b/build/bin/sample.sh
index 7cc50c5..9939c62 100644
--- a/build/bin/sample.sh
+++ b/build/bin/sample.sh
@@ -25,6 +25,10 @@ job_jar=`find -L ${KYLIN_HOME}/lib/ -name kylin-job*.jar`
 echo "Going to create sample tables in hive..."
 cd ${KYLIN_HOME}/sample_cube/data
 
+echo "Loading sample data into HDFS tmp path: /tmp/kylin/sample_cube/data"
+hadoop fs -mkdir -p /tmp/kylin/sample_cube/data
+hadoop fs -put * /tmp/kylin/sample_cube/data/
+
 hive_client_mode=`sh ${KYLIN_HOME}/bin/get-properties.sh kylin.hive.client`
 if [ "${hive_client_mode}" == "beeline" ]
 then
@@ -35,6 +39,8 @@ else
 fi
 
 echo "Sample hive tables are created successfully; Going to create sample cube..."
+hadoop fs -rm -r /tmp/kylin/sample_cube
+
 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; }
-echo "Sample cube is created successfully in project 'learn_kylin'; Restart Kylin server
or reload the metadata from web UI to see the change."
\ No newline at end of file
+echo "Sample cube is created successfully in project 'learn_kylin'; Restart Kylin server
or reload the metadata from web UI to see the change."

http://git-wip-us.apache.org/repos/asf/kylin/blob/3bdafb1a/examples/sample_cube/create_sample_tables.sql
----------------------------------------------------------------------
diff --git a/examples/sample_cube/create_sample_tables.sql b/examples/sample_cube/create_sample_tables.sql
index 943c0fa..d83566c 100644
--- a/examples/sample_cube/create_sample_tables.sql
+++ b/examples/sample_cube/create_sample_tables.sql
@@ -185,6 +185,6 @@ TRANS_ID bigint
 ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
 STORED AS TEXTFILE;
 
-LOAD DATA LOCAL INPATH 'DEFAULT.KYLIN_SALES.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_SALES;
-LOAD DATA LOCAL INPATH 'DEFAULT.KYLIN_CAL_DT.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_CAL_DT;
-LOAD DATA LOCAL INPATH 'DEFAULT.KYLIN_CATEGORY_GROUPINGS.csv' OVERWRITE INTO TABLE DEFAULT.KYLIN_CATEGORY_GROUPINGS;
\ No newline at end of file
+LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_SALES.csv' OVERWRITE INTO TABLE
DEFAULT.KYLIN_SALES;
+LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_CAL_DT.csv' OVERWRITE INTO TABLE
DEFAULT.KYLIN_CAL_DT;
+LOAD DATA INPATH '/tmp/kylin/sample_cube/data/DEFAULT.KYLIN_CATEGORY_GROUPINGS.csv' OVERWRITE
INTO TABLE DEFAULT.KYLIN_CATEGORY_GROUPINGS;
\ No newline at end of file


Mime
View raw message