You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ka...@apache.org on 2017/05/24 10:42:41 UTC
[10/50] [abbrv] kylin git commit: KYLIN-2526 refine
find-hive-dependency.sh to support Ubuntu
KYLIN-2526 refine find-hive-dependency.sh to support Ubuntu
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0061900b
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0061900b
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0061900b
Branch: refs/heads/KYLIN-2606
Commit: 0061900bb5bd34c8f0cc1c6e955d34bf34ca48e2
Parents: 5f52cea
Author: Cheng Wang <ch...@kyligence.io>
Authored: Thu May 18 11:04:47 2017 +0800
Committer: liyang-gmt8 <li...@apache.org>
Committed: Thu May 18 15:27:36 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/0061900b/build/bin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/build/bin/find-hive-dependency.sh b/build/bin/find-hive-dependency.sh
index 02a47ef..c4c7523 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()