Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-602 - Allow configurable number of handlers for search servers. Thanks to Seth Hartbecke from Search Wikia for spotting this.

Dennis Kubes9b68fcfcbfe6
diff --git a/CHANGES.txt b/CHANGES.txt
index 7884cdc09..85c08eb9f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -197,6 +197,9 @@ Unreleased changes (1.0-dev)
69. NUTCH-604 - Upgrade to Lucene 2.3.0 (ab)
+70. NUTCH-602 - Allow configurable number of handlers for search servers
+ (hartbecke via kubes)
+
Release 0.9 - 2007-04-02
1. Changed log4j confiquration to log to stdout on commandline
diff --git a/conf/nutch-default.xml b/conf/nutch-default.xml
index 9a39d6ea9..8121f1727 100644
--- a/conf/nutch-default.xml
+++ b/conf/nutch-default.xml
@@ -804,6 +804,13 @@
</description>
</property>
+<property>
+ <name>searcher.num.handlers</name>
+ <value>10</value>
+ <description>The number of handlers for the distributed search server.
+ </description>
+</property>
+
<!-- URL normalizer properties -->
<property>
diff --git a/src/java/org/apache/nutch/searcher/DistributedSearch.java b/src/java/org/apache/nutch/searcher/DistributedSearch.java
index 0d69fc3d1..d6eafe6cb 100644
--- a/src/java/org/apache/nutch/searcher/DistributedSearch.java
+++ b/src/java/org/apache/nutch/searcher/DistributedSearch.java
@@ -80,7 +80,8 @@ public class DistributedSearch {
static org.apache.hadoop.ipc.Server getServer(Configuration conf, Path directory, int port) throws IOException{
NutchBean bean = new NutchBean(conf, directory);
- return RPC.getServer(bean, "0.0.0.0", port, 10, true, conf);
+ int numHandlers = conf.getInt("searcher.num.handlers", 10);
+ return RPC.getServer(bean, "0.0.0.0", port, numHandlers, true, conf);
}
}