Apache Nutch is an extensible and scalable web crawler
NUTCH-2666 Increase default value for http.content.limit / ftp.content.limit / file.content.limit - increase the default content limit from 64 kB to 1024 kB
Sebastian Nagel13a9a6daf2ca
diff --git a/conf/nutch-default.xml b/conf/nutch-default.xmlindex 00cb845f1..bb5330130 100644--- a/conf/nutch-default.xml+++ b/conf/nutch-default.xml@@ -38,7 +38,7 @@<property><name>file.content.limit</name>- <value>65536</value>+ <value>1048576</value><description>The length limit for downloaded content using the file://protocol, in bytes. If this value is nonnegative (>=0), content longerthan it will be truncated; otherwise, no truncation at all. Do not@@ -215,9 +215,9 @@<property><name>http.content.limit</name>- <value>65536</value>- <description>The length limit for downloaded content using the http://- protocol, in bytes. If this value is nonnegative (>=0), content longer+ <value>1048576</value>+ <description>The length limit for downloaded content using the http/https+ protocols, in bytes. If this value is nonnegative (>=0), content longerthan it will be truncated; otherwise, no truncation at all. Do notconfuse this setting with the file.content.limit setting.</description>@@ -440,7 +440,7 @@<property><name>ftp.content.limit</name>- <value>65536</value>+ <value>1048576</value><description>The length limit for downloaded content, in bytes.If this value is nonnegative (>=0), content longer than it will be truncated;otherwise, no truncation at all.diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.javaindex a5c0a90f1..9fa6a7105 100644--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java@@ -86,7 +86,7 @@ public abstract class HttpBase implements Protocol {protected int timeout = 10000;/** The length limit for downloaded content, in bytes. */- protected int maxContent = 64 * 1024;+ protected int maxContent = 1024 * 1024;/** The time limit to download the entire content, in seconds. */protected int maxDuration = 300;@@ -194,7 +194,7 @@ public abstract class HttpBase implements Protocol {this.proxyException = arrayToMap(conf.getStrings("http.proxy.exception.list"));this.useProxy = (proxyHost != null && proxyHost.length() > 0);this.timeout = conf.getInt("http.timeout", 10000);- this.maxContent = conf.getInt("http.content.limit", 64 * 1024);+ this.maxContent = conf.getInt("http.content.limit", 1024 * 1024);this.maxDuration = conf.getInt("http.time.limit", -1);this.partialAsTruncated = conf.getBoolean("http.partial.truncated", false);diff --git a/src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/File.java b/src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/File.javaindex 8a415b664..17def964d 100644--- a/src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/File.java+++ b/src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/File.java@@ -73,7 +73,7 @@ public class File implements Protocol {*/public void setConf(Configuration conf) {this.conf = conf;- this.maxContentLength = conf.getInt("file.content.limit", 64 * 1024);+ this.maxContentLength = conf.getInt("file.content.limit", 1024 * 1024);this.crawlParents = conf.getBoolean("file.crawl.parent", true);this.symlinksAsRedirects = conf.getBoolean("file.crawl.redirect_noncanonical", true);diff --git a/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java b/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.javaindex 6d21b5043..7b70790dd 100644--- a/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java+++ b/src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Ftp.java@@ -251,7 +251,7 @@ public class Ftp implements Protocol {*/public void setConf(Configuration conf) {this.conf = conf;- this.maxContentLength = conf.getInt("ftp.content.limit", 64 * 1024);+ this.maxContentLength = conf.getInt("ftp.content.limit", 1024 * 1024);this.timeout = conf.getInt("ftp.timeout", 10000);this.userName = conf.get("ftp.username", "anonymous");this.passWord = conf.get("ftp.password", "[email protected]");