You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by qh...@apache.org on 2015/07/08 10:24:47 UTC
incubator-kylin git commit: KYLIN-882
Repository: incubator-kylin
Updated Branches:
refs/heads/0.8 b36b66c40 -> 7895199aa
KYLIN-882
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/7895199a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/7895199a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/7895199a
Branch: refs/heads/0.8
Commit: 7895199aa41df8e47bdd4e1dcf7223f7e5631987
Parents: b36b66c
Author: qianhao.zhou <qi...@ebay.com>
Authored: Wed Jul 8 15:37:46 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Wed Jul 8 16:23:40 2015 +0800
----------------------------------------------------------------------
bin/check-env.sh | 8 ++++++++
bin/check-sandbox-properties.sh | 9 ---------
bin/cleanup_streaming_files.sh | 3 ++-
bin/get-properties.sh | 15 +++++++++++++++
bin/kylin.sh | 6 +++---
5 files changed, 28 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/7895199a/bin/check-env.sh
----------------------------------------------------------------------
diff --git a/bin/check-env.sh b/bin/check-env.sh
index 5380679..dd0d27b 100644
--- a/bin/check-env.sh
+++ b/bin/check-env.sh
@@ -26,3 +26,11 @@ then
echo "Please make sure the user has the privilege to run hadoop shell"
exit 1
fi
+
+WORKING_DIR=`sh bin/get-properties.sh kylin.hdfs.working.dir`
+hadoop fs -mkdir -p $WORKING_DIR
+if [ $? != 0 ]
+then
+ echo "failed to create $WORKING_DIR, Please make sure the user has right to access $WORKING_DIR"
+ exit 1
+fi
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/7895199a/bin/check-sandbox-properties.sh
----------------------------------------------------------------------
diff --git a/bin/check-sandbox-properties.sh b/bin/check-sandbox-properties.sh
deleted file mode 100644
index cd037e3..0000000
--- a/bin/check-sandbox-properties.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-
-result=
-for i in `cat ${KYLIN_HOME}/conf/kylin.properties | grep 'kylin.sandbox' | grep -v '^#' |awk -F '=' '{print $2}' | cut -c 1-4`
-do
- :
- result=$i
-done
-echo $result
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/7895199a/bin/cleanup_streaming_files.sh
----------------------------------------------------------------------
diff --git a/bin/cleanup_streaming_files.sh b/bin/cleanup_streaming_files.sh
index 7f88c48..1fa7e8d 100644
--- a/bin/cleanup_streaming_files.sh
+++ b/bin/cleanup_streaming_files.sh
@@ -2,7 +2,8 @@
if [ $# != 1 ]
then
- echo 'invalid input' || exit -1
+ echo 'invalid input'
+ exit -1
fi
cd $KYLIN_HOME/logs
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/7895199a/bin/get-properties.sh
----------------------------------------------------------------------
diff --git a/bin/get-properties.sh b/bin/get-properties.sh
new file mode 100644
index 0000000..83ad8ea
--- /dev/null
+++ b/bin/get-properties.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+if [ $# != 1 ]
+then
+ echo 'invalid input'
+ exit -1
+fi
+
+result=
+for i in `cat ${KYLIN_HOME}/conf/kylin.properties | grep -w "$1" | grep -v '^#' |awk -F '=' '{print $2}' | cut -c 1-`
+do
+ :
+ result=$i
+done
+echo $result
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/7895199a/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/bin/kylin.sh b/bin/kylin.sh
index 6311f6c..6f0e16e 100644
--- a/bin/kylin.sh
+++ b/bin/kylin.sh
@@ -22,7 +22,7 @@ then
- useSandbox=`sh ${dir}/check-sandbox-properties.sh`
+ useSandbox=`sh ${dir}/get-properties.sh kylin.sandbox`
spring_profile="default"
if [ "$useSandbox" = "true" ]
then spring_profile="sandbox"
@@ -88,7 +88,7 @@ then
fi
if [ $2 == "start" ]
then
- useSandbox=`sh ${dir}/check-sandbox-properties.sh`
+ useSandbox=`sh ${dir}/get-properties.sh kylin.sandbox`
spring_profile="default"
if [ "$useSandbox" = "true" ]
then spring_profile="sandbox"
@@ -141,7 +141,7 @@ then
echo "monitor job"
tomcat_root=${dir}/../tomcat
export tomcat_root
- useSandbox=`sh ${dir}/check-sandbox-properties.sh`
+ useSandbox=`sh ${dir}/get-properties.sh kylin.sandbox`
spring_profile="default"
if [ "$useSandbox" = "true" ]
then spring_profile="sandbox"