Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-1717 HostDB not to complain if filters/normalizers are disabled

Markus Jelsma4c3d84a188b4
diff --git a/CHANGES.txt b/CHANGES.txt
index 50a105199..98193138c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,8 @@ Nutch Change Log
Nutch Development Trunk
+* NUTCH-1717 HostDB not to complain if filters/normalizers are disabled (markus)
+
* NUTCH-1715 RobotRulesParser adds additional '*' to the robots name (tejasp)
* NUTCH-356 Plugin repository cache can lead to memory leak (Enrico Triolo, Doğacan Güney via markus)
diff --git a/src/java/org/apache/nutch/util/hostdb/HostDb.java b/src/java/org/apache/nutch/util/hostdb/HostDb.java
index d0aac0e0b..c41c8bac6 100644
--- a/src/java/org/apache/nutch/util/hostdb/HostDb.java
+++ b/src/java/org/apache/nutch/util/hostdb/HostDb.java
@@ -505,12 +505,12 @@ public class HostDb extends Configured implements Tool {
conf.setBoolean(HOSTDB_URL_NORMALIZING, normalize);
// Check whether the urlfilter-domainblacklist plugin is loaded
- if ("urlfilter-domainblacklist".matches(conf.get("plugin.includes"))) {
+ if (filter && "urlfilter-domainblacklist".matches(conf.get("plugin.includes"))) {
throw new Exception("domainblacklist-urlfilter must not be enabled");
}
// Check whether the urlnormalizer-host plugin is loaded
- if ("urlnormalizer-host".matches(conf.get("plugin.includes"))) {
+ if (normalize && "urlnormalizer-host".matches(conf.get("plugin.includes"))) {
throw new Exception("urlnormalizer-host must not be enabled");
}