[ 
https://issues.apache.org/jira/browse/MAHOUT-946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13187755#comment-13187755
 ] 

tom pierce commented on MAHOUT-946:
-----------------------------------

Interesting thought - right now it seems to me the simplest "drop in" 
convenience method would be a (better-named) runAndThrowExceptionOnFailure().  
There could also be a version that returned a status code, but I think most 
locations that use status codes also run multiple jobs.  So you still have to 
check the return value at many of the call-sites, just like with 
Job.waitForCompletion().  

Some of these classes are also not AbstractJobs (though in some cases they 
should probably be converted - not sure it would make sense in all cases), some 
return some non-status value from the method that fires of the MR job, etc.  
Maybe a static util method would make more sense?

Taking a long view, I'd actually prefer to see most of these call sites 
re-worked to use return codes, rather than bake in exceptions.  Probably not 
pragmatic, though.  Sometimes done is the best color.  

Absent objections in the next day or so, I'll do something along the lines of 
static Job.waitForCompletion wrappers in AbstractJob.  
                
> Map-reduce job status often left unchecked
> ------------------------------------------
>
>                 Key: MAHOUT-946
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-946
>             Project: Mahout
>          Issue Type: Bug
>    Affects Versions: 0.6
>            Reporter: tom pierce
>         Attachments: MAHOUT-946.patch
>
>
> I've run into a few places in Mahout where mapreduce jobs can fail and their 
> status won't be checked, so processing will continue on.  This sometimes 
> obscures the root problem.  I've tracked down a bunch of places where this 
> problem exists, and tried to fix the code to do something reasonable (return 
> -1 status code, throw exception, etc.) when jobs fail.

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