[jira] Commented: (PIG-1293) pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set

2010-03-17 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12846565#action_12846565
 ] 

Allen Wittenauer commented on PIG-1293:
---

Let's get a bit more explicit:

$ cd /tmp
$ which pig
/export/apps/hadoop/bin/pig
$ bash -x pig
+ cygwin=false
+ case `uname` in
++ uname
+ debug=false
+ this=pig
+ '[' -h pig ']'
++ dirname pig
+ bin=.
++ basename pig
+ script=pig
++ unset CDPATH
++ cd .
++ pwd
+ bin=/tmp
+ this=/tmp/pig
++ dirname /tmp/pig
+ export PIG_HOME=/tmp/..


This is clearly wrong.  After applying the fix:


+ cygwin=false
+ case `uname` in
++ uname
+ debug=false
+ this=/export/apps/hadoop/bin/pig
+ '[' -h /export/apps/hadoop/bin/pig ']'
++ ls -ld /export/apps/hadoop/bin/pig
+ ls='lrwxrwxrwx   1 root root  24 Mar  5 09:05 
/export/apps/hadoop/bin/pig - /export/apps/pig/bin/pig'
++ expr 'lrwxrwxrwx   1 root root  24 Mar  5 09:05 
/export/apps/hadoop/bin/pig - /export/apps/pig/bin/pig' : '.*- \(.*\)$'
+ link=/export/apps/pig/bin/pig
+ expr /export/apps/pig/bin/pig : '.*/.*'
+ this=/export/apps/pig/bin/pig
+ '[' -h /export/apps/pig/bin/pig ']'
++ dirname /export/apps/pig/bin/pig
+ bin=/export/apps/pig/bin
++ basename /export/apps/pig/bin/pig
+ script=pig
++ unset CDPATH
++ cd /export/apps/pig/bin
++ pwd
+ bin=/export/apps/pig/bin
+ this=/export/apps/pig/bin/pig
++ dirname /export/apps/pig/bin/pig
+ export PIG_HOME=/export/apps/pig/bin/..

This is correct, even dealing with the symlink in the process, as expected.


 pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set
 -

 Key: PIG-1293
 URL: https://issues.apache.org/jira/browse/PIG-1293
 Project: Pig
  Issue Type: Bug
Affects Versions: 0.6.0
Reporter: Allen Wittenauer
 Attachments: PIG-1293.txt


 If PIG_HOME isn't set and pig is in the path, the pig wrapper script can't 
 find its home.  Setting PIG_HOME makes it hard to support multiple versions 
 of pig. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (PIG-1293) pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set

2010-03-16 Thread Alan Gates (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12846226#action_12846226
 ] 

Alan Gates commented on PIG-1293:
-

Allen,

I'm having trouble reproducing this issue, so I'm not sure how to test your 
fix.  If I take top of trunk and install it, then do:

{code}
gates echo $PIG_HOME

gates PATH=/usr/bin:/usr/local/bin:/bin:./bin which pig
/home/gates/tmp/pig-0.7.0-dev/bin/pig
gates PATH=/usr/bin:/usr/local/bin:/bin:./bin pig -x local 
~/pig/scripts/Checkin_2.local.pig
10/03/16 17:09:24 INFO pig.Main: Logging error messages to: 
/home/gates/tmp/pig-0.7.0-dev/pig_1268784564902.log
2010-03-16 17:09:25,205 [main] INFO  
org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to 
hadoop file system at: file:///
2010-03-16 17:09:26,047 [main] WARN  org.apache.pig.PigServer - Encountered 
Warning IMPLICIT_CAST_TO_INT 2 time(s).
...
{code}

What am I doing wrong here?

 pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set
 -

 Key: PIG-1293
 URL: https://issues.apache.org/jira/browse/PIG-1293
 Project: Pig
  Issue Type: Bug
Affects Versions: 0.6.0
Reporter: Allen Wittenauer
 Attachments: PIG-1293.txt


 If PIG_HOME isn't set and pig is in the path, the pig wrapper script can't 
 find its home.  Setting PIG_HOME makes it hard to support multiple versions 
 of pig. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (PIG-1293) pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set

2010-03-16 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12846236#action_12846236
 ] 

Allen Wittenauer commented on PIG-1293:
---

You likely have PIG_HOME configured.

Unset it, then try running bash -x pig and the message about being unable to 
find pig-env.sh won't be hidden by bash.  BTW, the hadoop equiv jira is 
HADOOP-6630, as it suffers from the same problem.

 pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set
 -

 Key: PIG-1293
 URL: https://issues.apache.org/jira/browse/PIG-1293
 Project: Pig
  Issue Type: Bug
Affects Versions: 0.6.0
Reporter: Allen Wittenauer
 Attachments: PIG-1293.txt


 If PIG_HOME isn't set and pig is in the path, the pig wrapper script can't 
 find its home.  Setting PIG_HOME makes it hard to support multiple versions 
 of pig. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (PIG-1293) pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set

2010-03-16 Thread Allen Wittenauer (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12846243#action_12846243
 ] 

Allen Wittenauer commented on PIG-1293:
---

Err, not PIG_HOME, PIG_CONF_DIR.

 pig wrapper script tends to fail if pig is in the path and PIG_HOME isn't set
 -

 Key: PIG-1293
 URL: https://issues.apache.org/jira/browse/PIG-1293
 Project: Pig
  Issue Type: Bug
Affects Versions: 0.6.0
Reporter: Allen Wittenauer
 Attachments: PIG-1293.txt


 If PIG_HOME isn't set and pig is in the path, the pig wrapper script can't 
 find its home.  Setting PIG_HOME makes it hard to support multiple versions 
 of pig. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.