Embeded Pig returns a different error code than what generated from python 
---------------------------------------------------------------------------

                 Key: PIG-2545
                 URL: https://issues.apache.org/jira/browse/PIG-2545
             Project: Pig
          Issue Type: Bug
    Affects Versions: 0.9.1
            Reporter: Vivek Padmanabhan


If i have a Pig script embedded in python (0.9 and above) and the python script 
exits with an exit
code , then Pig exits with a different error code.

To illustrate consider the below script;
{code}
#!/usr/bin/python
import sys 
from org.apache.pig.scripting import Pig

Q = Pig.compile(""" sh bash -c 'echo DATADATE=20110101 > param_20110101.txt' 
""")
result = Q.bind().runSingle()
sys.exit(10);
if result.isSuccessful() :
    print 'Pig job succeeded'
else :
    print 'Faled'
{code}

{code}
echo $?
6
{code}

Here the result should have been '10' instead of '6' . Please correct me if the 
expectation is otherwise.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to