Apache Nutch is an extensible and scalable web crawler
NUTCH-1245 URL gone with 404 after db.fetch.interval.max stays db_unfetched in CrawlDb and is generated over and over again
Sebastian Nagelba781d0b18eb
diff --git a/CHANGES.txt b/CHANGES.txtindex dee9ca4b6..c56ca2b9e 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change Log(trunk): Current Development+* NUTCH-1245 URL gone with 404 after db.fetch.interval.max stays db_unfetched in CrawlDb (snagel)+* NUTCH-1527 Elasticsearch indexer (lufeng + markus)* NUTCH-1475 Index-More Plugin -- A better fall back value for date field (James Sullivan, snagel via lewismc)diff --git a/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java b/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.javaindex 07971a065..93e0f34b1 100755--- a/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java+++ b/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java@@ -85,9 +85,8 @@ public abstract class AbstractFetchSchedule extends Configured implements FetchS/*** This method specifies how to schedule refetching of pages- * marked as GONE. Default implementation increases fetchInterval by 50%,- * and if it exceeds the <code>maxInterval</code> it calls- * {@link #forceRefetch(Text, CrawlDatum, boolean)}.+ * marked as GONE. Default implementation increases fetchInterval by 50%+ * but the value may never exceed <code>maxInterval</code>.** @param url URL of the page.*@@ -102,9 +101,11 @@ public abstract class AbstractFetchSchedule extends Configured implements FetchSlong prevFetchTime, long prevModifiedTime, long fetchTime) {// no page is truly GONE ... just increase the interval by 50%// and try much later.- datum.setFetchInterval(datum.getFetchInterval() * 1.5f);+ if ((datum.getFetchInterval() * 1.5f) < maxInterval)+ datum.setFetchInterval(datum.getFetchInterval() * 1.5f);+ else+ datum.setFetchInterval(maxInterval * 0.9f);datum.setFetchTime(fetchTime + (long)datum.getFetchInterval() * 1000);- if (maxInterval < datum.getFetchInterval()) forceRefetch(url, datum, false);return datum;}