Apache Nutch is an extensible and scalable web crawler
NUTCH-1071 Crawldb update to total counts per status
Julien Nioche060ebd4d7f10
diff --git a/CHANGES.txt b/CHANGES.txtindex 37d596aad..bf851d0b5 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogRelease 1.4 - Current development+* NUTCH-1071 Crawldb update displays total number of URLs per status (jnioche)+* NUTCH-1045 MimeUtil to rely on default config provided by Tika (jnioche)* NUTCH-1057 Fetcher thread time out configurable (markus)diff --git a/src/java/org/apache/nutch/crawl/CrawlDbReducer.java b/src/java/org/apache/nutch/crawl/CrawlDbReducer.javaindex 2b532b8b1..8db9b5910 100644--- a/src/java/org/apache/nutch/crawl/CrawlDbReducer.java+++ b/src/java/org/apache/nutch/crawl/CrawlDbReducer.java@@ -151,6 +151,7 @@ public class CrawlDbReducer implements Reducer<Text, CrawlDatum, Text, CrawlDatuif (!fetchSet) {if (oldSet) {// at this point at least "old" should be presentoutput.collect(key, old);+ reporter.getCounter("CrawlDB status", CrawlDatum.getStatusName(result.getStatus())).increment(1);} else {LOG.warn("Missing fetch and old value, signature=" + signature);}@@ -291,6 +292,7 @@ public class CrawlDbReducer implements Reducer<Text, CrawlDatum, Text, CrawlDatu// remove generation time, if anyresult.getMetaData().remove(Nutch.WRITABLE_GENERATE_TIME_KEY);output.collect(key, result);+ reporter.getCounter("CrawlDB status", CrawlDatum.getStatusName(result.getStatus())).increment(1);}}