Author: cutting
Date: Thu Sep 29 11:57:35 2005
New Revision: 292509

URL: http://svn.apache.org/viewcvs?rev=292509&view=rev
Log:
Use a more reasonable value when timing out hung fetcher threads.

Modified:
    lucene/nutch/branches/mapred/src/java/org/apache/nutch/crawl/Fetcher.java

Modified: 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/crawl/Fetcher.java
URL: 
http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/src/java/org/apache/nutch/crawl/Fetcher.java?rev=292509&r1=292508&r2=292509&view=diff
==============================================================================
--- lucene/nutch/branches/mapred/src/java/org/apache/nutch/crawl/Fetcher.java 
(original)
+++ lucene/nutch/branches/mapred/src/java/org/apache/nutch/crawl/Fetcher.java 
Thu Sep 29 11:57:35 2005
@@ -290,7 +290,8 @@
       // some threads seem to hang, despite all intentions
       if (done) {                                 // last entry read
         long doneTime = System.currentTimeMillis();
-        long timeout = getConf().getLong("http.timeout", 10000) * 10;
+        long timeout =             // select timeout that avoids a task timeout
+          NutchConf.get().getInt("mapred.task.timeout", 10*60*1000)/2;
         while (activeThreads > 0
                && System.currentTimeMillis()-doneTime < timeout) {
           try {


Reply via email to