Repository: kylin
Updated Branches:
  refs/heads/master 422b362ee -> dc08186d5


KYLIN-1724 Fix start script for Amazon EMR

Signed-off-by: Li Yang <[email protected]>


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

Branch: refs/heads/master
Commit: dc08186d570e16b37d9ddaab80aba28801cdb3d0
Parents: 422b362
Author: Roger Shi <[email protected]>
Authored: Fri May 20 13:40:31 2016 +0800
Committer: Li Yang <[email protected]>
Committed: Mon May 23 10:52:45 2016 +0800

----------------------------------------------------------------------
 build/bin/find-hbase-dependency.sh | 9 ++++++++-
 build/bin/find-hive-dependency.sh  | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/dc08186d/build/bin/find-hbase-dependency.sh
----------------------------------------------------------------------
diff --git a/build/bin/find-hbase-dependency.sh 
b/build/bin/find-hbase-dependency.sh
index b6922cb..c29de43 100644
--- a/build/bin/find-hbase-dependency.sh
+++ b/build/bin/find-hbase-dependency.sh
@@ -18,6 +18,13 @@
 #
 
 hbase_classpath=`hbase classpath`
+
+# special handling for Amazon EMR, to prevent re-init of hbase-setenv
+is_aws=`uname -r | grep amzn`
+if [ -n is_aws ] && [ -d "/usr/lib/oozie/lib" ]; then
+    export HBASE_ENV_INIT="true"
+fi
+
 arr=(`echo $hbase_classpath | cut -d ":"  --output-delimiter=" " -f 1-`)
 hbase_common_path=
 for data in ${arr[@]}
@@ -37,4 +44,4 @@ fi
 
 hbase_dependency=${hbase_common_path}
 echo "hbase dependency: $hbase_dependency"
-export hbase_dependency
\ No newline at end of file
+export hbase_dependency

http://git-wip-us.apache.org/repos/asf/kylin/blob/dc08186d/build/bin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/build/bin/find-hive-dependency.sh 
b/build/bin/find-hive-dependency.sh
index 576d06d..5b748fc 100644
--- a/build/bin/find-hive-dependency.sh
+++ b/build/bin/find-hive-dependency.sh
@@ -70,12 +70,16 @@ then
     echo "HCAT_HOME not found, try to find hcatalog path from hadoop home"
     hadoop_home=`echo $hive_exec_path | awk -F '/hive.*/lib/' '{print $1}'`
     hive_home=`echo $hive_exec_path | awk -F '/lib/' '{print $1}'`
+    is_aws=`uname -r | grep amzn`
     if [ -d "${hadoop_home}/hive-hcatalog" ]; then
       hcatalog_home=${hadoop_home}/hive-hcatalog
     elif [ -d "${hadoop_home}/hive/hcatalog" ]; then
       hcatalog_home=${hadoop_home}/hive/hcatalog
     elif [ -d "${hive_home}/hcatalog" ]; then
       hcatalog_home=${hive_home}/hcatalog
+    elif [ -n is_aws ] && [ -d "/usr/lib/oozie/lib" ]; then
+      # special handling for Amazon EMR, where hcat libs are under oozie!?
+      hcatalog_home=/usr/lib/oozie/lib
     else 
       echo "Couldn't locate hcatalog installation, please make sure it is 
installed and set HCAT_HOME to the path."
       exit 1

Reply via email to