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

ASF GitHub Bot commented on NUTCH-2518:
---------------------------------------

lewismc closed pull request #299: NUTCH-2518 Must check return value of 
job.waitForCompletion()
URL: https://github.com/apache/nutch/pull/299
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/src/java/org/apache/nutch/crawl/CrawlDbReader.java 
b/src/java/org/apache/nutch/crawl/CrawlDbReader.java
index 9be246a58..ffdefa1a5 100644
--- a/src/java/org/apache/nutch/crawl/CrawlDbReader.java
+++ b/src/java/org/apache/nutch/crawl/CrawlDbReader.java
@@ -400,7 +400,7 @@ public void close() {
 
           try {
             int complete = job.waitForCompletion(true)?0:1;
-          } catch (InterruptedException | ClassNotFoundException e) {
+          } catch (IOException | InterruptedException | ClassNotFoundException 
e) {
             LOG.error(StringUtils.stringifyException(e));
             throw e;
           }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Must check return value of job.waitForCompletion()
> --------------------------------------------------
>
>                 Key: NUTCH-2518
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2518
>             Project: Nutch
>          Issue Type: Bug
>          Components: crawldb, fetcher, generator, hostdb, linkdb
>    Affects Versions: 1.15
>            Reporter: Sebastian Nagel
>            Priority: Blocker
>             Fix For: 1.15
>
>
> The return value of job.waitForCompletion() of the new MapReduce API 
> (NUTCH-2375) must always be checked. If it's not true, the job has been 
> failed or killed. Accordingly, the program
> - should not proceed with further jobs/steps
> - must clean-up temporary data, unlock CrawlDB, etc.
> - exit with non-zero exit value, so that scripts running the crawl workflow 
> can handle the failure
> Cf. NUTCH-2076, NUTCH-2442, [NUTCH-2375 PR 
> #221|https://github.com/apache/nutch/pull/221#issuecomment-332941883].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to