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

Daniel Dai closed PIG-977.
--------------------------


> exit status does not account for JOB_STATUS.TERMINATED
> ------------------------------------------------------
>
>                 Key: PIG-977
>                 URL: https://issues.apache.org/jira/browse/PIG-977
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Thejas M Nair
>            Assignee: Ashutosh Chauhan
>             Fix For: 0.7.0
>
>         Attachments: pig-977.patch
>
>
> For determining the exit status of pig query, only JOB_STATUS.FAILED is being 
> used and status TERMINATED is ignored.
> I think the reason for this is that in  ExecJob.JOB_STATUS only FAILED and 
> COMPLETED are being used anywhere. Rest are unused. I think we should comment 
> out the unused parts for now to indicate that, or fix the code  for 
> determining success/failure in GruntParser. executeBatch 
> {code}
>     public enum JOB_STATUS {
>         QUEUED,
>         RUNNING,
>         SUSPENDED,
>         TERMINATED,
>         FAILED,
>         COMPLETED,
>     }
> {code}
> {code}
>     private void executeBatch() throws IOException {
>         if (mPigServer.isBatchOn()) {
>             if (mExplain != null) {
>                 explainCurrentBatch();
>             }
>             if (!mLoadOnly) {
>                 List<ExecJob> jobs = mPigServer.executeBatch();
>                 for(ExecJob job: jobs) {
> == ====>      if (job.getStatus() == ExecJob.JOB_STATUS.FAILED) {
>                         mNumFailedJobs++;
>                         if (job.getException() != null) {
>                             LogUtils.writeLog(
>                               job.getException(), 
>                               
> mPigServer.getPigContext().getProperties().getProperty("pig.logfile"), 
>                               log, 
>                               
> "true".equalsIgnoreCase(mPigServer.getPigContext().getProperties().getProperty("verbose")),
>                               "Pig Stack Trace");
>                         }
>                     }
>                     else {
>                         mNumSucceededJobs++;
>                     }
>                 }
>             }
>         }
>     }
> {code}
> Any opinions ?

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

Reply via email to