Author: mattmann
Date: Wed Jul 14 20:11:55 2010
New Revision: 964165
URL: http://svn.apache.org/viewvc?rev=964165&view=rev
Log:
- fix for NUTCH-774 Retry interval in crawl date is set to 0
Modified:
nutch/trunk/CHANGES.txt
nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java
nutch/trunk/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
nutch/trunk/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java
Modified: nutch/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/nutch/trunk/CHANGES.txt?rev=964165&r1=964164&r2=964165&view=diff
==============================================================================
--- nutch/trunk/CHANGES.txt (original)
+++ nutch/trunk/CHANGES.txt Wed Jul 14 20:11:55 2010
@@ -2,6 +2,8 @@ Nutch Change Log
Release 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)
Modified: nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java
URL:
http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java?rev=964165&r1=964164&r2=964165&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java
(original)
+++ nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java Wed
Jul 14 20:11:55 2010
@@ -145,7 +145,7 @@ public abstract class AbstractFetchSched
* 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 instance
Modified: nutch/trunk/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
URL:
http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java?rev=964165&r1=964164&r2=964165&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
(original)
+++ nutch/trunk/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java Wed
Jul 14 20:11:55 2010
@@ -40,7 +40,7 @@ import org.apache.nutch.util.NutchConfig
* </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>
Modified: nutch/trunk/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java
URL:
http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java?rev=964165&r1=964164&r2=964165&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java
(original)
+++ nutch/trunk/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java Wed
Jul 14 20:11:55 2010
@@ -35,6 +35,9 @@ public class DefaultFetchSchedule extend
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;