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.
A = load  '$INPUT' using PigStorage();
store A into '$OUTPUT';

I run this as with Multi-query optimization turned off :
$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

The directory "/user/viraj/junk1" is not present

I get the following results:
Failed to read data from "/user/viraj/junk1"
Failed to produce result in "/user/viraj/junk2"

This is expected, but the return code is still 0
$ echo $?

If I run this script with Multi-query optimization turned on, it gives, a return code of 2,
which is correct.

$ 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 $?

I believe a wrong return code from Pig, is causing Oozie to believe that Pig script succeeded.


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

View raw message