[ 
https://issues.apache.org/jira/browse/PIG-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olga Natkovich resolved PIG-1615.
---------------------------------

    Resolution: Fixed

> Return code from Pig is 0 even if the job fails when using -M flag
> ------------------------------------------------------------------
>
>                 Key: PIG-1615
>                 URL: https://issues.apache.org/jira/browse/PIG-1615
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.6.0, 0.7.0
>            Reporter: Viraj Bhat
>             Fix For: 0.8.0
>
>
> I have a Pig script of this form, which I used inside a workflow system such 
> as Oozie.
> {code}
> A = load  '$INPUT' using PigStorage();
> store A into '$OUTPUT';
> {code}
> I run this as with Multi-query optimization turned off :
> {quote}
> $java -cp ~/pig-svn/trunk/pig.jar:$HADOOP_CONF_DIR org.apache.pig.Main -p 
> INPUT=/user/viraj/junk1 -M -p OUTPUT=/user/viraj/junk2 loadpigstorage.pig
> {quote}
> The directory "/user/viraj/junk1" is not present
> I get the following results:
> {quote}
> Input(s):
> Failed to read data from "/user/viraj/junk1"
> Output(s):
> Failed to produce result in "/user/viraj/junk2"
> {quote}
> This is expected, but the return code is still 0
> {code}
> $ echo $?
> 0
> {code}
> If I run this script with Multi-query optimization turned on, it gives, a 
> return code of 2, which is correct.
> {code}
> $ java -cp ~/pig-svn/trunk/pig.jar:$HADOOP_CONF_DIR org.apache.pig.Main -p 
> INPUT=/user/viraj/junk1 -p OUTPUT=/user/viraj/junk2 loadpigstorage.pig
> ...
> $ echo $?
> 2
> {code}
> I believe a wrong return code from Pig, is causing Oozie to believe that Pig 
> script succeeded.
> Viraj

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

Reply via email to