[
https://issues.apache.org/jira/browse/PIG-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jie Li reassigned PIG-2780:
---------------------------
Assignee: Jie Li
> 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
>
>
> 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