You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by cu...@apache.org on 2005/09/29 20:57:37 UTC

svn commit: r292509 - /lucene/nutch/branches/mapred/src/java/org/apache/nutch/crawl/Fetcher.java

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 {