Author: siren
Date: Tue Aug  8 12:09:58 2006
New Revision: 429779

URL: http://svn.apache.org/viewvc?rev=429779&view=rev
Log:
NUTCH-344 - Fix for thread blocking issue contributed by Greg Kim

Modified:
    lucene/nutch/branches/branch-0.8/CHANGES.txt
    
lucene/nutch/branches/branch-0.8/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
    lucene/nutch/trunk/CHANGES.txt
    
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java

Modified: lucene/nutch/branches/branch-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/lucene/nutch/branches/branch-0.8/CHANGES.txt?rev=429779&r1=429778&r2=429779&view=diff
==============================================================================
--- lucene/nutch/branches/branch-0.8/CHANGES.txt (original)
+++ lucene/nutch/branches/branch-0.8/CHANGES.txt Tue Aug  8 12:09:58 2006
@@ -1,12 +1,14 @@
 Nutch Change Log
 
-Release 0.8.1 ????-??-??
+Unreleased changes (0.8.1)
 
  1. Changed log4j confiquration to log to stdout on commandline
     tools (siren)
     
  2. NUTCH-260 - Updated hadoop.jar to contain patch from HADOOP-387
     (siren)
+    
+ 3. NUTCH-344 - Fix for thread blocking issue (Greg Kim via siren)
 
 Release 0.8 - 2006-07-25
 

Modified: 
lucene/nutch/branches/branch-0.8/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/branches/branch-0.8/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java?rev=429779&r1=429778&r2=429779&view=diff
==============================================================================
--- 
lucene/nutch/branches/branch-0.8/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
 (original)
+++ 
lucene/nutch/branches/branch-0.8/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
 Tue Aug  8 12:09:58 2006
@@ -377,8 +377,8 @@
   
   private static void cleanExpiredServerBlocks() {
     synchronized (BLOCKED_ADDR_TO_TIME) {
-      while (!BLOCKED_ADDR_QUEUE.isEmpty()) {
-        String host = (String) BLOCKED_ADDR_QUEUE.getLast();
+      for(int i = BLOCKED_ADDR_QUEUE.size()-1; i >= 0; i--){
+       String host = (String) BLOCKED_ADDR_QUEUE.get(i);
         long time = ((Long) BLOCKED_ADDR_TO_TIME.get(host)).longValue();
         if (time <= System.currentTimeMillis()) {
           BLOCKED_ADDR_TO_TIME.remove(host);

Modified: lucene/nutch/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/CHANGES.txt?rev=429779&r1=429778&r2=429779&view=diff
==============================================================================
--- lucene/nutch/trunk/CHANGES.txt (original)
+++ lucene/nutch/trunk/CHANGES.txt Tue Aug  8 12:09:58 2006
@@ -1,5 +1,12 @@
 Nutch Change Log
 
+Unreleased changes (0.9-dev)
+
+ 1. Changed log4j confiquration to log to stdout on commandline
+    tools (siren)
+
+ 2. NUTCH-344 - Fix for thread blocking issue (Greg Kim via siren)
+
 Release 0.8 - 2006-07-25
 
  0. Totally new architecture, based on hadoop

Modified: 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
URL: 
http://svn.apache.org/viewvc/lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java?rev=429779&r1=429778&r2=429779&view=diff
==============================================================================
--- 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
 (original)
+++ 
lucene/nutch/trunk/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
 Tue Aug  8 12:09:58 2006
@@ -377,8 +377,8 @@
   
   private static void cleanExpiredServerBlocks() {
     synchronized (BLOCKED_ADDR_TO_TIME) {
-      while (!BLOCKED_ADDR_QUEUE.isEmpty()) {
-        String host = (String) BLOCKED_ADDR_QUEUE.getLast();
+      for(int i = BLOCKED_ADDR_QUEUE.size()-1; i >= 0; i--){
+       String host = (String) BLOCKED_ADDR_QUEUE.get(i);
         long time = ((Long) BLOCKED_ADDR_TO_TIME.get(host)).longValue();
         if (time <= System.currentTimeMillis()) {
           BLOCKED_ADDR_TO_TIME.remove(host);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nutch-cvs mailing list
Nutch-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nutch-cvs

Reply via email to