Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-957 fetcher.timelimit.mins is invalid when depth is greater than 1

Julien Nioche66454e404371
diff --git a/CHANGES.txt b/CHANGES.txt
index 572b4c773..cfb3a78d0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,8 @@ Nutch Change Log
Release 1.3 - Current Development
+* NUTCH-927 Fetcher.timelimit.mins is invalid when depth is greater than 1 (Wade Lau via jnioche)
+
* NUTCH-824 Crawling - File Error 404 when fetching file with an hexadecimal character in the file name (Michela Becchi via jnioche)
* NUTCH-954 Strict application of Content-Length limit for http protocols (Alexis Detreglode via jnioche)
diff --git a/src/java/org/apache/nutch/fetcher/Fetcher.java b/src/java/org/apache/nutch/fetcher/Fetcher.java
index 840744cde..12b0bcdf0 100644
--- a/src/java/org/apache/nutch/fetcher/Fetcher.java
+++ b/src/java/org/apache/nutch/fetcher/Fetcher.java
@@ -323,7 +323,7 @@ public class Fetcher extends Configured implements Tool,
this.byIP = conf.getBoolean("fetcher.threads.per.host.by.ip", false);
this.crawlDelay = (long) (conf.getFloat("fetcher.server.delay", 1.0f) * 1000);
this.minCrawlDelay = (long) (conf.getFloat("fetcher.server.min.delay", 0.0f) * 1000);
- this.timelimit = conf.getLong("fetcher.timelimit.mins", -1);
+ this.timelimit = conf.getLong("fetcher.timelimit", -1);
this.maxExceptionsPerQueue = conf.getInt("fetcher.max.exceptions.per.queue", -1);
}
@@ -1014,7 +1014,7 @@ public class Fetcher extends Configured implements Tool,
//feeder.setPriority((Thread.MAX_PRIORITY + Thread.NORM_PRIORITY) / 2);
// the value of the time limit is either -1 or the time where it should finish
- long timelimit = getConf().getLong("fetcher.timelimit.mins", -1);
+ long timelimit = getConf().getLong("fetcher.timelimit", -1);
if (timelimit != -1) feeder.setTimeLimit(timelimit);
feeder.start();
@@ -1081,7 +1081,7 @@ public class Fetcher extends Configured implements Tool,
if (timelimit != -1) {
timelimit = System.currentTimeMillis() + (timelimit * 60 * 1000);
LOG.info("Fetcher Timelimit set for : " + timelimit);
- getConf().setLong("fetcher.timelimit.mins", timelimit);
+ getConf().setLong("fetcher.timelimit", timelimit);
}
JobConf job = new NutchJob(getConf());