Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2566 Fix exception log messages - improve CrawlDb.update(...) log messages

Sebastian Nagel2b2efeaceb3a
diff --git a/src/java/org/apache/nutch/crawl/CrawlDb.java b/src/java/org/apache/nutch/crawl/CrawlDb.java
index 9a68abba2..7af3b6b19 100644
--- a/src/java/org/apache/nutch/crawl/CrawlDb.java
+++ b/src/java/org/apache/nutch/crawl/CrawlDb.java
@@ -134,7 +134,7 @@ public class CrawlDb extends NutchTool implements Tool {
try {
boolean success = job.waitForCompletion(true);
if (!success) {
- String message = "Crawl job did not succeed, job status:"
+ String message = "CrawlDb update job did not succeed, job status:"
+ job.getStatus().getState() + ", reason: "
+ job.getStatus().getFailureInfo();
LOG.error(message);
@@ -142,7 +142,7 @@ public class CrawlDb extends NutchTool implements Tool {
throw new RuntimeException(message);
}
} catch (IOException | InterruptedException | ClassNotFoundException e) {
- LOG.error("Crawl job failed: {}", e.getMessage());
+ LOG.error("CrawlDb update job failed: {}", e.getMessage());
NutchJob.cleanupAfterFailure(outPath, lock, fs);
throw e;
}