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

xuting zhao updated PIG-2291:
-----------------------------

    Fix Version/s:     (was: 0.11)
                   0.9.0
                   0.10
           Status: Patch Available  (was: Open)

I have changed the return type to return PigStats.get(); The ant test-commit 
has been ran successfully on trunk, 0.9 and 0.10 branch. Additional unit test 
cases are added into TestScriptLanguage and this specific unit test has ran 
successfully on 0.9, 0.10 and trunk as well. If there is additional unit test 
that I missed to run, please let me know. Thanks.
Xuting
                
> PigStats.isSuccessful returns false if embedded pig script has dump
> -------------------------------------------------------------------
>
>                 Key: PIG-2291
>                 URL: https://issues.apache.org/jira/browse/PIG-2291
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Vivek Padmanabhan
>            Assignee: xuting zhao
>             Fix For: 0.10, 0.9.0
>
>         Attachments: PIG-2291.patch
>
>
> The below is my python script, 
> {code}
> #! /usr/bin/python
> from  org.apache.pig.scripting import Pig
> P = Pig.compileFromFile("""a.pig""")
> result = P.bind().runSingle()
> if result.isSuccessful():
>     print 'Pig job succeeded'
> else:
>     print 'Pig job failed'
> {code}
> The below is the pig script embedded (a.pig)
> A = LOAD 'a1' USING PigStorage(',') AS (f1:chararray,f2:chararray);
> B = GROUP A by f1;
> dump B;
> For this script execution, even though the job is successful the output 
> printed is 'Pig job failed'
> This is because result.isSuccessful() is returning false whenever the pig 
> script is having a dump statement.
> If i run the pig script alone, then the error code returned is proper.

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