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/02/27 07:25:34 UTC

[21/41] 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/c130f7c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kylin/tree/c130f7c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kylin/diff/c130f7c0

Branch: refs/heads/inverted-index
Commit: c130f7c0282f6699d64ceef2df1171bf09cabefe
Parents: 16b184d
Author: qianhao.zhou <qi...@ebay.com>
Authored: Fri Feb 13 11:49:12 2015 +0800
Committer: qianhao.zhou <qi...@ebay.com>
Committed: Fri Feb 13 11:49:12 2015 +0800

----------------------------------------------------------------------
 bin/find-hive-dependency.sh | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/c130f7c0/bin/find-hive-dependency.sh
----------------------------------------------------------------------
diff --git a/bin/find-hive-dependency.sh b/bin/find-hive-dependency.sh
index 7bd5f43..44496c5 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 'hive-exec.jar'`
+    result=`echo $data | grep -e 'hive-exec-[0-9\.-]*jar'`
     if [ $result ]
     then
         hive_exec_path=$data
@@ -15,6 +15,25 @@ 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/*:${hdp_home}/hive-hcatalog/share/hcatalog/*
+hive_dependency=/usr/hdp/current/hive-client/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
+
+if [ hcatalog = "" ]
+then
+    echo "hcatalog lib not found"
+    exit 1
+fi
+
+hive_dependency=${hive_dependency}:${hcatalog}
 echo "hive dependency: $hive_dependency"
 export hive_dependency
\ No newline at end of file