pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jie Li (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PIG-2780) MapReduceLauncher should break early when one of the jobs throws an exception
Date Sat, 07 Jul 2012 00:15:34 GMT

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

Jie Li updated PIG-2780:
------------------------

    Attachment: PIG-2780.0.patch

Attached a patch that checks frequently whether any job has failed, and if so stops immediately.


Also includes a unit test where Pig submits three jobs at the same time and one of them will
fail. With this patch, Pig will stop without finishing the other two jobs.
                
> MapReduceLauncher should break early when one of the jobs throws an exception
> -----------------------------------------------------------------------------
>
>                 Key: PIG-2780
>                 URL: https://issues.apache.org/jira/browse/PIG-2780
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Feng Peng
>            Assignee: Jie Li
>             Fix For: 0.11
>
>         Attachments: PIG-2780.0.patch
>
>
> Right now MapReduceLauncher caches the job exception in jobControlException and only
processes it when all the jobs are done:
> {noformat}
>   jcThread.setUncaughtExceptionHandler(jctExceptionHandler);
>   ...
>   jcThread.start();
>   // Now wait, till we are finished.
>   while(!jc.allFinished()){
>   ...
>   }
>   //check for the jobControlException first
>   //if the job controller fails before launching the jobs then there are
>   //no jobs to check for failure
>   if (jobControlException != null) {
>     ...
>   }
> {noformat}
> There are two problems with this approach:
> 1. There is only one jobControlException variable. If two jobs are throwing exceptions,
the first one will be lost.
> 2. If there are multiple jobs, the exceptions will not be reported until other jobs are
finished, which is a waste of system resource.

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

        

Mime
View raw message