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 2019/12/09 09:46:02 UTC

[kylin] 06/11: 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.1
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 916090682bf592f0cbcc84d94e8972f420d07eda
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 f8f0f1d..299b2d7 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 06e2a11..80c68d7 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" ]