manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1562634 - in /manifoldcf/trunk/connectors: rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/
Date Wed, 29 Jan 2014 23:21:13 GMT
Author: kwright
Date: Wed Jan 29 23:21:13 2014
New Revision: 1562634

URL: http://svn.apache.org/r1562634
Log:
Byte-rate throttling was off by a factor of 1000.  Part of CONNECTORS-872.

Modified:
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottleDescription.java

Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java?rev=1562634&r1=1562633&r2=1562634&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
(original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
Wed Jan 29 23:21:13 2014
@@ -193,7 +193,7 @@ public class RSSConnector extends org.ap
         {
           int maxKBytesPerSecondPerServer = Integer.parseInt(x);
           if (maxKBytesPerSecondPerServer > 0)
-            minimumMillisecondsPerBytePerServer = ((double)1.0)/(double)maxKBytesPerSecondPerServer;
+            minimumMillisecondsPerBytePerServer = 1000.0/(double)maxKBytesPerSecondPerServer;
         }
         catch (NumberFormatException e)
         {

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottleDescription.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottleDescription.java?rev=1562634&r1=1562633&r2=1562634&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottleDescription.java
(original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottleDescription.java
Wed Jan 29 23:21:13 2014
@@ -91,7 +91,7 @@ public class ThrottleDescription impleme
               {
                 double kbPerSecond = new Double(value).doubleValue();
                 if (kbPerSecond > 0)
-                  minMillisecondsPerByte = new Double(((double)1.0)/(double)kbPerSecond);
+                  minMillisecondsPerByte = new Double(1000.0/(double)kbPerSecond);
               }
               catch (NumberFormatException e)
               {
@@ -200,6 +200,7 @@ public class ThrottleDescription impleme
         }
       }
     }
+    System.out.println("Minimum milliseconds per byte is "+minMilliseconds);
     return minMilliseconds;
   }
 



Mime
View raw message