Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> pig shell script does not check for PIG_HOME being set prior to exporting


Copy link to this message
-
Re: pig shell script does not check for PIG_HOME being set prior to exporting
We should make PIG_HOME configurable. Can you create a jira and upload a
patch?

Thanks,
Rohini
On Sat, Mar 2, 2013 at 6:14 PM, Robert <[EMAIL PROTECTED]> wrote:

> It looks like the pig shell script in v0.11 exports PIG_HOME without first
> checking to see if it already exists.
>
> from line 78 in <path>/bin/pig:
> # the root of the Pig installation
> export PIG_HOME=`dirname "$this"`/..
>
> Going through the script it appears most env variables are checked prior
> to setting, but not this one.  Is there a reason why?
>
> Background: I ask this because I was getting an error resolving the path
> to pig.jar.  From what I gather it is because I use a symbolic link in
> /usr/local/bin to the pig script instead of modifying my PATH.  This meant
> `$this` in the bash script returned the path to /usr/local/bin instead of
> /usr/local/pig-0.11.0/bin.
>
> I modified my local version to the following:
>
> # the root of the Pig installation
> if [ -z "$PIG_HOME" ]; then
>     export PIG_HOME=`dirname "$this"`/..
> fi
>
> Is this something the script should have in it, or am I operating outside
> of the expected scenario?
>
> Thanks,
> Robert
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB