You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sj...@apache.org on 2017/05/16 10:10:01 UTC
kylin git commit: KYLIN-2526 fix find-hive-dependency.sh bug in Ubuntu
Repository: kylin
Updated Branches:
refs/heads/2.0.x 374ce86f8 -> b5d0c40ae
KYLIN-2526 fix find-hive-dependency.sh bug in Ubuntu
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b5d0c40a
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b5d0c40a
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b5d0c40a
Branch: refs/heads/2.0.x
Commit: b5d0c40ae2f5a14c3f59c36aa2837a3ce9ec9190
Parents: 374ce86
Author: Cheng Wang <ch...@kyligence.io>
Authored: Tue May 16 10:04:07 2017 +0800
Committer: Roger Shi <ro...@hotmail.com>
Committed: Tue May 16 18:07:27 2017 +0800
----------------------------------------------------------------------
build/bin/find-hive-dependency.sh | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/b5d0c40a/build/bin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/build/bin/find-hive-dependency.sh b/build/bin/find-hive-dependency.sh
index ccf33b2..6247f01 100644
--- a/build/bin/find-hive-dependency.sh
+++ b/build/bin/find-hive-dependency.sh
@@ -100,10 +100,10 @@ fi
function checkFileExist()
{
- files=$1
+ files=(`echo $1 | cut -d ":" -f 1- | sed 's/:/ /g'`)
misFiles=0
outputMissFiles=
- for file in ${files//:/ }
+ for file in ${files}
do
let allFiles++
if [ ! -f "${file}" ]; then
@@ -111,8 +111,10 @@ function checkFileExist()
let misFiles++
fi
done
- ratio=`echo "scale=3; ${misFiles}/${allFiles}" | bc`
- [[ `echo "$ratio < 0.01" | bc ` -eq 1 ]] || quit "A couple of hive jars can't be found: ${outputMisFiles}!"
+ if [ 0 != ${misFiles} ]; then
+ times=`expr ${allFiles} / ${misFiles}`
+ [[ ${times} -gt 10 ]] || quit "A couple of hive jars can't be found: ${outputMisFiles}, please export HIVE_LIB='YOUR_LOCAL_HIVE_LIB'"
+ fi
}
function validateDirectory()