You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by lu...@apache.org on 2015/09/06 09:59:59 UTC
[35/50] [abbrv] incubator-kylin git commit: KYLIN-957 Support HBase
in a separate cluster, minor fix
KYLIN-957 Support HBase in a separate cluster, minor fix
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/0bc870db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/0bc870db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/0bc870db
Branch: refs/heads/0.7
Commit: 0bc870db76152a09e5acdb6dccc7d870f0112a6c
Parents: 2748643
Author: sunyerui <su...@gmail.com>
Authored: Fri Aug 28 18:00:58 2015 +0800
Committer: Luke Han <lu...@apache.org>
Committed: Sun Sep 6 14:37:59 2015 +0800
----------------------------------------------------------------------
bin/check-env.sh | 5 +++--
bin/sample.sh | 6 ++++++
2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0bc870db/bin/check-env.sh
----------------------------------------------------------------------
diff --git a/bin/check-env.sh b/bin/check-env.sh
index 1597c53..89a4aed 100644
--- a/bin/check-env.sh
+++ b/bin/check-env.sh
@@ -46,9 +46,10 @@ then
fi
WORKING_DIR=`sh $KYLIN_HOME/bin/get-properties.sh kylin.hdfs.working.dir`
-hadoop fs -mkdir -p $WORKING_DIR
+HADOOP_FS=`sh $KYLIN_HOME/bin/get-properties.sh kylin.hadoop.cluster.fs`
+hadoop fs -mkdir -p $HADOOP_FS/$WORKING_DIR
if [ $? != 0 ]
then
- echo "failed to create $WORKING_DIR, Please make sure the user has right to access $WORKING_DIR"
+ echo "failed to create $HADOOP_FS/$WORKING_DIR, Please make sure the user has right to access $HADOOP_FS/$WORKING_DIR"
exit 1
fi
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/0bc870db/bin/sample.sh
----------------------------------------------------------------------
diff --git a/bin/sample.sh b/bin/sample.sh
index 4843529..7c4999f 100644
--- a/bin/sample.sh
+++ b/bin/sample.sh
@@ -20,9 +20,15 @@
dir=$(dirname ${0})
source ${dir}/check-env.sh
job_jar=`find ${KYLIN_HOME}/lib/ -name kylin-job*.jar`
+HADOOP_FS=`sh $KYLIN_HOME/bin/get-properties.sh kylin.hadoop.cluster.fs`
echo "Going to create sample tables in hive..."
cd ${KYLIN_HOME}/sample_cube/data
+if [ -z $HADOOP_FS ];then
hive -f ${KYLIN_HOME}/sample_cube/create_sample_tables.sql || { exit 1; }
+else
+hive -hiveconf fs.defaultFS=${HADOOP_FS} -f ${KYLIN_HOME}/sample_cube/create_sample_tables.sql || { exit 1; }
+fi
+
echo "Sample hive tables are created successfully; Going to create 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; }