Apache Nutch is an extensible and scalable web crawler
- fix for NUTCH-774 Retry interval in crawl date is set to 0
Chris Mattmann5463a41dc4d3
diff --git a/CHANGES.txt b/CHANGES.txtindex 5447391f8..a6a5f96c7 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -2,6 +2,8 @@ Nutch Change LogRelease 2.0 - Current Development+* NUTCH-774 Retry interval in crawl date is set to 0 (Reinhard Schwab via mattmann)+* NUTCH-697 Generate log output for solr indexer and dedup (Dmitry Lihachev, Jeroen van Vianen via mattmann)* NUTCH-844 Improve NutchConfiguration (ab)diff --git a/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java b/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.javaindex 23b48baec..2b930aab9 100755--- a/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java+++ b/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java@@ -145,7 +145,7 @@ public abstract class AbstractFetchSchedule extends Configured implements FetchS* included in the further selection process based on scores. The default* implementation checks <code>fetchTime</code>, if it is higher than the* {@param curTime} it returns false, and true otherwise. It will also- * check that fetchTime is not too remote (more than <code>maxInterval</code),+ * check that fetchTime is not too remote (more than <code>maxInterval</code>,* in which case it lowers the interval and returns true.* @param url URL of the page* @param datum datum instancediff --git a/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java b/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.javaindex ccd956c5c..588d39c14 100755--- a/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java+++ b/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java@@ -40,7 +40,7 @@ import org.apache.nutch.util.NutchConfiguration;* </ul>* </li>* <li>the minimum value of fetchInterval may not be smaller than MIN_INTERVAL- * (default is 1s).</li>+ * (default is 1 minute).</li>* <li>the maximum value of fetchInterval may not be bigger than MAX_INTERVAL* (default is 365 days).</li>* </ul>diff --git a/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java b/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.javaindex 8db9a3230..9419c44c6 100755--- a/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java+++ b/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java@@ -35,6 +35,9 @@ public class DefaultFetchSchedule extends AbstractFetchSchedule {long fetchTime, long modifiedTime, int state) {datum = super.setFetchSchedule(url, datum, prevFetchTime, prevModifiedTime,fetchTime, modifiedTime, state);+ if (datum.getFetchInterval() == 0 ) {+ datum.setFetchInterval(defaultInterval);+ }datum.setFetchTime(fetchTime + (long)datum.getFetchInterval() * 1000);datum.setModifiedTime(modifiedTime);return datum;