You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2020/06/19 11:06:12 UTC

[kylin] 05/10: KYLIN-4072 find-hbase-dependency.sh don't work at CDH 6.x

This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch master-hadoop3
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 675273eb7c99eb488a66d0f2a1b64a11fe9ece63
Author: XiaoxiangYu <hi...@126.com>
AuthorDate: Wed Jul 17 10:30:22 2019 +0800

    KYLIN-4072 find-hbase-dependency.sh don't work at CDH 6.x
---
 build/bin/find-hbase-dependency.sh | 14 ++++++++++++--
 build/bin/find-hive-dependency.sh  |  2 +-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/build/bin/find-hbase-dependency.sh b/build/bin/find-hbase-dependency.sh
index b4631ba..848ac2a 100755
--- a/build/bin/find-hbase-dependency.sh
+++ b/build/bin/find-hbase-dependency.sh
@@ -23,6 +23,9 @@ echo Retrieving hbase dependency...
 
 hbase_classpath=`hbase classpath`
 
+hadoop version | head -1 | grep cdh6
+is_cdh6=$?
+
 # 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
@@ -42,10 +45,17 @@ done
 
 if [ -z "$hbase_common_path" ]
 then
-    quit "hbase-common lib not found"
+    if [[ $is_cdh6 -ne 0 ]]; then
+    	quit "hbase-common lib not found"
+    fi
+fi
+
+if [[ $is_cdh6 -eq 0 ]]; then
+    hbase_dependency=${hbase_classpath}
+else
+    hbase_dependency=${hbase_common_path}
 fi
 
-hbase_dependency=${hbase_common_path}
 verbose "hbase dependency: $hbase_dependency"
 export hbase_dependency
 echo "export HBASE_ENV_INIT=$HBASE_ENV_INIT
diff --git a/build/bin/find-hive-dependency.sh b/build/bin/find-hive-dependency.sh
index 22ee8f4..02da707 100755
--- a/build/bin/find-hive-dependency.sh
+++ b/build/bin/find-hive-dependency.sh
@@ -37,7 +37,7 @@ else
     hive_env=`hive ${hive_conf_properties} -e set 2>&1 | grep 'env:CLASSPATH'`
 fi
 
-if [ -z $hive_env ]
+if [ -z "${hive_env}" ]
 then
     hive_permission=`hive ${hive_conf_properties} -e set 2>&1 | grep 'No valid credentials provided'`
     if [ -n "$hive_permission" ]