You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Remus Rusanu <re...@microsoft.com> on 2014/03/05 10:21:51 UTC

hive script when invoked through a link

I tried making /usr/bin/hive a link to /usr/lib/hive-0.14/bin/hive . But the launch fails because:

bin=`dirname "$0"`
bin=`cd "$bin"; pwd`

. "$bin"/hive-config.sh

So I used a readlink -f first, to locate the proper script home, and then it works fine.
My question is: is this kind of problem something we track and open a JIRA about, or is this kind of issue left as something for the packagers/distributors to worry about and fix (given that the distributions vary wildly from the pure trunk build package artifact)?

Thanks,
~Remus


RE: hive script when invoked through a link

Posted by Remus Rusanu <re...@microsoft.com>.
HIVE-6553 it is then
I'm not sure $BASH_SOURCE makes any diff, is the readlink that is critical. 

-----Original Message-----
From: Brock Noland [mailto:brock@cloudera.com] 
Sent: Wednesday, March 05, 2014 2:46 PM
To: dev@hive.apache.org
Subject: Re: hive script when invoked through a link

This should be fixed on trunk. I believe we want to use the BAS_SOURCE environment variable.
On Mar 5, 2014 3:22 AM, "Remus Rusanu" <re...@microsoft.com> wrote:

> I tried making /usr/bin/hive a link to /usr/lib/hive-0.14/bin/hive . 
> But the launch fails because:
>
> bin=`dirname "$0"`
> bin=`cd "$bin"; pwd`
>
> . "$bin"/hive-config.sh
>
> So I used a readlink -f first, to locate the proper script home, and 
> then it works fine.
> My question is: is this kind of problem something we track and open a 
> JIRA about, or is this kind of issue left as something for the 
> packagers/distributors to worry about and fix (given that the 
> distributions vary wildly from the pure trunk build package artifact)?
>
> Thanks,
> ~Remus
>
>

Re: hive script when invoked through a link

Posted by Brock Noland <br...@cloudera.com>.
This should be fixed on trunk. I believe we want to use the BAS_SOURCE
environment variable.
On Mar 5, 2014 3:22 AM, "Remus Rusanu" <re...@microsoft.com> wrote:

> I tried making /usr/bin/hive a link to /usr/lib/hive-0.14/bin/hive . But
> the launch fails because:
>
> bin=`dirname "$0"`
> bin=`cd "$bin"; pwd`
>
> . "$bin"/hive-config.sh
>
> So I used a readlink -f first, to locate the proper script home, and then
> it works fine.
> My question is: is this kind of problem something we track and open a JIRA
> about, or is this kind of issue left as something for the
> packagers/distributors to worry about and fix (given that the distributions
> vary wildly from the pure trunk build package artifact)?
>
> Thanks,
> ~Remus
>
>