Author: cutting
Date: Tue Jul 19 11:50:35 2005
New Revision: 219753

URL: http://svn.apache.org/viewcvs?rev=219753&view=rev
Log:
Use a few more threads for servers, make server timeout configurable.

Modified:
    lucene/nutch/branches/mapred/src/java/org/apache/nutch/ipc/Server.java
    
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobTracker.java
    
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/TaskTracker.java
    lucene/nutch/branches/mapred/src/java/org/apache/nutch/ndfs/NameNode.java

Modified: lucene/nutch/branches/mapred/src/java/org/apache/nutch/ipc/Server.java
URL: 
http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/src/java/org/apache/nutch/ipc/Server.java?rev=219753&r1=219752&r2=219753&view=diff
==============================================================================
--- lucene/nutch/branches/mapred/src/java/org/apache/nutch/ipc/Server.java 
(original)
+++ lucene/nutch/branches/mapred/src/java/org/apache/nutch/ipc/Server.java Tue 
Jul 19 11:50:35 2005
@@ -33,6 +33,7 @@
 import java.util.logging.Level;
 
 import org.apache.nutch.util.LogFormatter;
+import org.apache.nutch.util.NutchConf;
 import org.apache.nutch.io.Writable;
 import org.apache.nutch.io.UTF8;
 
@@ -52,7 +53,8 @@
   private int maxQueuedCalls;                     // max number of queued calls
   private Class paramClass;                       // class of call parameters
 
-  private int timeout = 10000;                    // timeout for i/o
+  private int timeout = NutchConf.get().getInt("ipc.client.timeout",10000);
+
   private boolean running = true;                 // true while server runs
   private LinkedList callQueue = new LinkedList(); // queued calls
   private Object callDequeued = new Object();     // used by wait/notify

Modified: 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobTracker.java
URL: 
http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobTracker.java?rev=219753&r1=219752&r2=219753&view=diff
==============================================================================
--- 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobTracker.java 
(original)
+++ 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/JobTracker.java 
Tue Jul 19 11:50:35 2005
@@ -219,7 +219,7 @@
         InetSocketAddress addr = getAddress(conf);
         this.localMachine = addr.getHostName();
         this.port = addr.getPort();
-        this.interTrackerServer = RPC.getServer(this, addr.getPort());
+        this.interTrackerServer = RPC.getServer(this,addr.getPort(),10,false);
         this.interTrackerServer.start();
        Properties p = System.getProperties();
        for (Iterator it = p.keySet().iterator(); it.hasNext(); ) {

Modified: 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/TaskTracker.java
URL: 
http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/TaskTracker.java?rev=219753&r1=219752&r2=219753&view=diff
==============================================================================
--- 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/TaskTracker.java 
(original)
+++ 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/mapred/TaskTracker.java 
Tue Jul 19 11:50:35 2005
@@ -99,9 +99,11 @@
         this.mapOutputPort = 32768+r.nextInt(32768);
 
         // RPC initialization
-        this.taskReportServer = RPC.getServer(this, taskReportPort);
+        this.taskReportServer =
+          RPC.getServer(this, taskReportPort, MAX_CURRENT_TASKS, false);
         this.taskReportServer.start();
-        this.mapOutputServer = RPC.getServer(this, mapOutputPort);
+        this.mapOutputServer =
+          RPC.getServer(this, mapOutputPort, MAX_CURRENT_TASKS, false);
         this.mapOutputServer.start();
 
         // Clear out temporary files that might be lying around

Modified: 
lucene/nutch/branches/mapred/src/java/org/apache/nutch/ndfs/NameNode.java
URL: 
http://svn.apache.org/viewcvs/lucene/nutch/branches/mapred/src/java/org/apache/nutch/ndfs/NameNode.java?rev=219753&r1=219752&r2=219753&view=diff
==============================================================================
--- lucene/nutch/branches/mapred/src/java/org/apache/nutch/ndfs/NameNode.java 
(original)
+++ lucene/nutch/branches/mapred/src/java/org/apache/nutch/ndfs/NameNode.java 
Tue Jul 19 11:50:35 2005
@@ -54,7 +54,7 @@
      */
     public NameNode(File dir, int port) throws IOException {
         this.namesystem = new FSNamesystem(dir);
-        this.server = RPC.getServer(this, port);
+        this.server = RPC.getServer(this, port, 10, false);
         this.server.start();
     }
 


Reply via email to