pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viraj Bhat (JIRA)" <j...@apache.org>
Subject [jira] Created: (PIG-1615) Return code from Pig is 0 even if the job fails when using -M flag
Date Thu, 16 Sep 2010 23:56:32 GMT
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.7.0, 0.6.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.


Mime
View raw message