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
The following commit(s) were added to refs/heads/master-hadoop3.1 by this push: new a1a1f79 KYLIN-4072 find-hbase-dependency.sh don't work at CDH 6.x a1a1f79 is described below commit a1a1f79548b0d8cf851e4af2c9a35305257a9254 Author: XiaoxiangYu <hit_la...@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 c98b5ac..a663e31 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,9 +45,16 @@ 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 diff --git a/build/bin/find-hive-dependency.sh b/build/bin/find-hive-dependency.sh index 64a8373..bb74b73 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" ]