You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ma...@apache.org on 2010/07/14 22:12:14 UTC
svn commit: r964166 - in /nutch/branches/branch-1.2: CHANGES.txt
src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java
src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java
Author: mattmann
Date: Wed Jul 14 20:12:14 2010
New Revision: 964166
URL: http://svn.apache.org/viewvc?rev=964166&view=rev
Log:
- fix for NUTCH-774 Retry interval in crawl date is set to 0
Modified:
nutch/branches/branch-1.2/CHANGES.txt
nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java
nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java
Modified: nutch/branches/branch-1.2/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.2/CHANGES.txt?rev=964166&r1=964165&r2=964166&view=diff
==============================================================================
--- nutch/branches/branch-1.2/CHANGES.txt (original)
+++ nutch/branches/branch-1.2/CHANGES.txt Wed Jul 14 20:12:14 2010
@@ -2,6 +2,8 @@ Nutch Change Log
Release 1.2 - 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-850 SolrDeleteDuplicates needs to clone the SolrRecord objects (jnioche)
Modified: nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java?rev=964166&r1=964165&r2=964166&view=diff
==============================================================================
--- nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java (original)
+++ nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java Wed Jul 14 20:12:14 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/branches/branch-1.2/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java?rev=964166&r1=964165&r2=964166&view=diff
==============================================================================
--- nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java (original)
+++ nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/AdaptiveFetchSchedule.java Wed Jul 14 20:12:14 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/branches/branch-1.2/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java?rev=964166&r1=964165&r2=964166&view=diff
==============================================================================
--- nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java (original)
+++ nutch/branches/branch-1.2/src/java/org/apache/nutch/crawl/DefaultFetchSchedule.java Wed Jul 14 20:12:14 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;