Apache Nutch is an extensible and scalable web crawler
Changed ipc timeout to be configurable (NUTCH-15)
Sami Siren7d37f3845c1d
diff --git a/conf/nutch-default.xml b/conf/nutch-default.xmlindex af99eed61..7da161c75 100644--- a/conf/nutch-default.xml+++ b/conf/nutch-default.xml@@ -547,6 +547,14 @@mime types mapping information</description></property>+<!-- ipc properties -->++<property>+ <name>ipc.client.timeout</name>+ <value>10000</value>+ <description>Defines the timeout for IPC calls in milliseconds. </description>+</property>+<!-- plugin properties --><property>diff --git a/src/java/org/apache/nutch/ipc/Client.java b/src/java/org/apache/nutch/ipc/Client.javaindex 5614bd220..34deae789 100644--- a/src/java/org/apache/nutch/ipc/Client.java+++ b/src/java/org/apache/nutch/ipc/Client.java@@ -32,6 +32,7 @@ import java.util.logging.Logger;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;@@ -49,7 +50,7 @@ public class Client {private Hashtable connections = new Hashtable();private Class valueClass; // class of call values- private int timeout = 10000; // timeout for calls+ private int timeout = NutchConf.get().getInt("ipc.client.timeout",10000); // timeout for callsprivate int counter; // counter for call idsprivate boolean running = true; // true while client runs