Apache Nutch is an extensible and scalable web crawler
NUTCH-2553 Add comment why objects are copied in QueueFeeder
Sebastian Nagel3a6c23a40ab5
diff --git a/src/java/org/apache/nutch/fetcher/QueueFeeder.java b/src/java/org/apache/nutch/fetcher/QueueFeeder.javaindex 8281876e0..72009ad3a 100644--- a/src/java/org/apache/nutch/fetcher/QueueFeeder.java+++ b/src/java/org/apache/nutch/fetcher/QueueFeeder.java@@ -87,6 +87,10 @@ public class QueueFeeder extends Thread {try {hasMore = context.nextKeyValue();if (hasMore) {+ /*+ * Need to copy key and value objects because MapReduce will reuse+ * the original objects while the objects are stored in the queue.+ */Text url = new Text((Text)context.getCurrentKey());CrawlDatum datum = new CrawlDatum();datum.set((CrawlDatum)context.getCurrentValue());