This two patches could fix the problem. The first patch is a hadoop
patch and the other patch is a nutch patch. I dont know whether i
should create a bug in the nutch-jira and hadoop-jira?
Anyway... here are the two patches.
Index: src/java/org/apache/hadoop/ipc/Server.java
===================================================================
--- src/java/org/apache/hadoop/ipc/Server.java (revision 383691)
+++ src/java/org/apache/hadoop/ipc/Server.java (working copy)
@@ -33,6 +33,7 @@
import java.util.logging.Level;
import org.apache.hadoop.util.LogFormatter;
+import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.UTF8;
@@ -59,6 +60,8 @@
private LinkedList callQueue = new LinkedList(); // queued calls
private Object callDequeued = new Object(); // used by wait/
notify
+ private Configuration conf;
+
/** A call queued for handling. */
private static class Call {
private int id; // the client's
call id
@@ -234,6 +237,7 @@
this.handlerCount = handlerCount;
this.maxQueuedCalls = handlerCount;
this.timeout = conf.getInt("ipc.client.timeout",10000);
+ this.conf = conf;
}
/** Sets the timeout used for network i/o. */
@@ -280,6 +284,9 @@
Writable param; // construct param
try {
param = (Writable)paramClass.newInstance();
+ if(param instanceof Configurable) {
+ ((Configurable) param).setConf(conf);
+ }
} catch (InstantiationException e) {
throw new RuntimeException(e.toString());
} catch (IllegalAccessException e) {
Index: src/java/org/apache/nutch/searcher/Query.java
===================================================================
--- src/java/org/apache/nutch/searcher/Query.java (revision 376518)
+++ src/java/org/apache/nutch/searcher/Query.java (working copy)
@@ -26,13 +26,14 @@
import java.util.logging.Logger;
import org.apache.hadoop.util.LogFormatter;
+import org.apache.hadoop.conf.Configurable;
import org.apache.hadoop.conf.Configuration;
import org.apache.nutch.analysis.NutchAnalysis;
import org.apache.nutch.util.NutchConfiguration;
import org.apache.hadoop.io.Writable;
/** A Nutch query. */
-public final class Query implements Writable, Cloneable {
+public final class Query implements Writable, Cloneable, Configurable {
public static final Logger LOG =
LogFormatter.getLogger("org.apache.nutch.searcher.Query");
@@ -286,6 +287,8 @@
public Query(Configuration conf) {
this.conf = conf;
}
+
+ public Query() { }
/** Return all clauses. */
public Clause[] getClauses() {
@@ -456,4 +459,12 @@
System.out.println("Translated: " + new QueryFilters
(conf).filter(query));
}
}
+
+ public void setConf(Configuration arg0) {
+ this.conf = arg0;
+ }
+
+ public Configuration getConf() {
+ return this.conf;
+ }
}
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Nutch-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-general