Apache Nutch is an extensible and scalable web crawler
Temporary workaround for a situation where we may end up with a lone STATUS_SIGNATURE. The real reason for this error is unknown at this moment, please report if you encounter this.
Andrzej Bialecki74e8aad50399
diff --git a/src/java/org/apache/nutch/crawl/CrawlDbReducer.java b/src/java/org/apache/nutch/crawl/CrawlDbReducer.javaindex 94a6484f0..c0eabda04 100644--- a/src/java/org/apache/nutch/crawl/CrawlDbReducer.java+++ b/src/java/org/apache/nutch/crawl/CrawlDbReducer.java@@ -19,11 +19,16 @@ package org.apache.nutch.crawl;import java.util.Iterator;import java.io.IOException;+import java.util.logging.*;+import org.apache.hadoop.io.*;import org.apache.hadoop.mapred.*;+import org.apache.hadoop.util.LogFormatter;/** Merge new page entries with existing entries. */public class CrawlDbReducer implements Reducer {+ public static final Logger LOG =+ LogFormatter.getLogger("org.apache.nutch.crawl.CrawlDbReducer");private int retryMax;private CrawlDatum result = new CrawlDatum();@@ -102,6 +107,9 @@ public class CrawlDbReducer implements Reducer {result.setNextFetchTime();break;+ case CrawlDatum.STATUS_SIGNATURE:+ LOG.warning("Lone CrawlDatum.STATUS_SIGNATURE: " + key);+ return;case CrawlDatum.STATUS_FETCH_RETRY: // temporary failureif (old != null)result.setSignature(old.getSignature()); // use old signature@@ -119,7 +127,7 @@ public class CrawlDbReducer implements Reducer {break;default:- throw new RuntimeException("Unknown status: "+highest.getStatus());+ throw new RuntimeException("Unknown status: " + highest.getStatus() + " " + key);}result.setScore(result.getScore() + scoreIncrement);