You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2015/03/03 11:28:31 UTC
[17/50] incubator-kylin git commit: fix script
fix script
Project: http://git-wip-us.apache.org/repos/asf/incubator-kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kylin/commit/093ce7ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/093ce7ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/093ce7ed
Branch: refs/heads/master
Commit: 093ce7edffe18463ae4ffc55acb060955a0cf8c3
Parents: 21e7820
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Feb 13 14:55:14 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Feb 13 14:55:14 2015 +0800
----------------------------------------------------------------------
bin/find-hive-dependency.sh | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/093ce7ed/bin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/bin/find-hive-dependency.sh b/bin/find-hive-dependency.sh
index 44496c5..4ae1a26 100644
--- a/bin/find-hive-dependency.sh
+++ b/bin/find-hive-dependency.sh
@@ -7,7 +7,7 @@ arr=(`echo $hive_classpath | cut -d ":" --output-delimiter=" " -f 1-`)
hive_exec_path=
for data in ${arr[@]}
do
- result=`echo $data | grep -e 'hive-exec-[0-9\.-]*jar'`
+ result=`echo $data | grep -e 'hive-exec[0-9\.-]*jar'`
if [ $result ]
then
hive_exec_path=$data
@@ -15,20 +15,11 @@ do
done
hdp_home=`echo $hive_exec_path | awk -F '/hive/lib/' '{print $1}'`
-hive_dependency=/usr/hdp/current/hive-client/conf/:${hdp_home}/hive/lib/*
+hive_dependency=${hdp_home}/hive/conf:${hdp_home}/hive/lib/*
-hcatalog=""
-if [ -d "${hdp_home}/hive-hcatalog/share/hcatalog/" ]
-then
- hcatalog="${hdp_home}/hive-hcatalog/share/hcatalog/*"
-else
- if [ -d "${hdp_home}/hcatalog/share/hcatalog/" ]
- then
- hcatalog="${hdp_home}/hcatalog/share/hcatalog/*"
- fi
-fi
+hcatalog=`find $hdp_home -name "hive-hcatalog-core[0-9\.-]*jar" 2>&1 | grep -m 1 -v 'Permission denied'`
-if [ hcatalog = "" ]
+if [ -z "$hcatalog" ]
then
echo "hcatalog lib not found"
exit 1