[ https://issues.apache.org/jira/browse/PIG-2543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Dai updated PIG-2543: ---------------------------- Attachment: PIG-2543-1.patch For this particular issue, we don't need to change PigStats interface. All we need is to return success if no mapreduce job is running. I change "sh" command so it throws exception when error occur. This is in par with "fs" and "sql" command. > PigStats.isSuccessful returns false if embedded pig script has sh commands > -------------------------------------------------------------------------- > > Key: PIG-2543 > URL: https://issues.apache.org/jira/browse/PIG-2543 > Project: Pig > Issue Type: Bug > Affects Versions: 0.9.1, 0.10 > Reporter: Vivek Padmanabhan > Fix For: 0.10 > > Attachments: PIG-2543-1.patch > > > For the below script even though the command is successful, > result.isSuccessful() returns false and hence raise exception > {code} > #!/usr/bin/python > from org.apache.pig.scripting import Pig > Q = Pig.compile("sh echo mymessage") > result = Q.bind().runSingle() > if result.isSuccessful() : > print 'Pig job succeeded' > else : > raise 'Cant run sh command' > {code} -- 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