Author: ab Date: Wed Nov 25 17:10:25 2009 New Revision: 884198 URL: http://svn.apache.org/viewvc?rev=884198&view=rev Log: NUTCH-773 Some minor bugs in AbstractFetchSchedule.
Modified: lucene/nutch/trunk/CHANGES.txt lucene/nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java Modified: lucene/nutch/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/CHANGES.txt?rev=884198&r1=884197&r2=884198&view=diff ============================================================================== --- lucene/nutch/trunk/CHANGES.txt (original) +++ lucene/nutch/trunk/CHANGES.txt Wed Nov 25 17:10:25 2009 @@ -2,6 +2,8 @@ Unreleased Changes +* NUTCH-773 - Some minor bugs in AbstractFetchSchedule (Reinhard Schwab) + * NUTCH-765 - Allow Crawl class to call Either Solr or Lucene Indexer (kubes) * NUTCH-735 - crawl-tool.xml must be read before nutch-site.xml when Modified: lucene/nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java?rev=884198&r1=884197&r2=884198&view=diff ============================================================================== --- lucene/nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java (original) +++ lucene/nutch/trunk/src/java/org/apache/nutch/crawl/AbstractFetchSchedule.java Wed Nov 25 17:10:25 2009 @@ -125,7 +125,7 @@ */ public CrawlDatum setPageRetrySchedule(Text url, CrawlDatum datum, long prevFetchTime, long prevModifiedTime, long fetchTime) { - datum.setFetchTime(fetchTime + (long)SECONDS_PER_DAY); + datum.setFetchTime(fetchTime + (long)SECONDS_PER_DAY*1000); datum.setRetriesSinceFetch(datum.getRetriesSinceFetch() + 1); return datum; } @@ -159,7 +159,9 @@ // pages with too long fetchInterval are adjusted so that they fit within // maximum fetchInterval (segment retention period). if (datum.getFetchTime() - curTime > (long) maxInterval * 1000) { - datum.setFetchInterval(maxInterval * 0.9f); + if (datum.getFetchInterval() > maxInterval) { + datum.setFetchInterval(maxInterval * 0.9f); + } datum.setFetchTime(curTime); } if (datum.getFetchTime() > curTime) {