kylin-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h..@uni.de
Subject Bash-script improvement proposals
Date Tue, 27 Oct 2015 09:08:21 GMT
Hello again :),

after trying out the newest Kylin build (1.2-hbase), I came across
some minor issues (HDP 2.3 stack) with two bash-scripts located in
/bin/.

1) find-hive-dependency.sh
In HDP 2.3, hcatalog is located in ../hive-hcatalog - so if you run
the find-dependency script, it fails with "hcatalog lib not found".

This is due to the line:
hive_home=`echo $hive_exec_path | awk -F '/lib/' '{print $1}'`/

It forces the script to use find in e.g. /usr/hdp/2.3.0.0-2557/hive/
(which does not include hcatalog files).
If you change the following two lines, the script will also search in
/hive-hcatalog/ and the error disappears (remove trailing slash and
add wildcard operator):

# line 39
hive_home=`echo $hive_exec_path | awk -F '/lib/' '{print $1}'`

# line 41
hcatalog=`find $hive_home* -name "hive-hcatalog-core[0-9\.-]*jar" 2>&1
| grep -m 1 -v 'Permission denied'`


2) kylin.sh
If you run the kylin.sh script without any parameters (GNU bash), it
will output the following errors:
./kylin.sh: line 25: [: ==: unary operator expected
./kylin.sh: line 96: [: ==: unary operator expected
usage: kylin.sh start or kylin.sh stop

Changing the following to lines will "fix" this (add "" around the $1
parameter):

# line 25
if [ "$1" == "start" ]

# line 96
elif [ "$1" == "stop" ]

-Seb

Mime
View raw message