Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

Fixed http://issues.apache.org/jira/browse/NUTCH-8. Added a working parameter to control the number of fetcher retries and removed a broken one.

Douglass Cuttingec497cc6e6ac
diff --git a/conf/nutch-default.xml b/conf/nutch-default.xml
index eb15f2e45..af99eed61 100644
--- a/conf/nutch-default.xml
+++ b/conf/nutch-default.xml
@@ -246,6 +246,13 @@
</description>
</property>
+<property>
+ <name>db.fetch.retry.max</name>
+ <value>3</value>
+ <description>The maximum number of times a url that has encountered
+ recoverable errors is generated for fetch.</description>
+</property>
+
<!-- fetchlist tool properties -->
<property>
@@ -281,13 +288,6 @@
should be allowed to access a host at one time.</description>
</property>
-<property>
- <name>fetcher.retry.max</name>
- <value>3</value>
- <description>The maximum number of times the fetcher will attempt to get
- a page that has encountered recoverable errors. </description>
-</property>
-
<property>
<name>fetcher.verbose</name>
<value>false</value>
diff --git a/src/java/org/apache/nutch/tools/UpdateDatabaseTool.java b/src/java/org/apache/nutch/tools/UpdateDatabaseTool.java
index 4b1ebb597..b35b5efe9 100644
--- a/src/java/org/apache/nutch/tools/UpdateDatabaseTool.java
+++ b/src/java/org/apache/nutch/tools/UpdateDatabaseTool.java
@@ -55,7 +55,9 @@ public class UpdateDatabaseTool {
public static final Logger LOG =
LogFormatter.getLogger("org.apache.nutch.tools.UpdateDatabaseTool");
- private static final int MAX_RETRIES = 2;
+ private static final int MAX_RETRIES =
+ NutchConf.get().getInt("db.fetch.retry.max", 2);
+
private static final long MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
private IWebDBWriter webdb;