Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-1656 ParseMeta not passed to CrawlDatum for not_modified

Markus Jelsma6136d94dc19a
diff --git a/CHANGES.txt b/CHANGES.txt
index 62012004a..04ebc7358 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,8 @@ Nutch Change Log
Nutch Development Trunk
+* NUTCH-1656 ParseMeta not passed to CrawlDatum for not_modified (markus)
+
* NUTCH-1606 Check that Factory classes use the cache in a thread safe way (jnioche)
* NUTCH-1653 AbstractScoringFilter (jnioche)
diff --git a/src/java/org/apache/nutch/crawl/CrawlDbReducer.java b/src/java/org/apache/nutch/crawl/CrawlDbReducer.java
index 7254a9791..59edd9bf2 100644
--- a/src/java/org/apache/nutch/crawl/CrawlDbReducer.java
+++ b/src/java/org/apache/nutch/crawl/CrawlDbReducer.java
@@ -243,12 +243,15 @@ public class CrawlDbReducer implements Reducer<Text, CrawlDatum, Text, CrawlDatu
else result.setStatus(CrawlDatum.STATUS_DB_UNFETCHED);
}
result.setSignature(signature);
- if (metaFromParse != null) {
- for (Entry<Writable, Writable> e : metaFromParse.entrySet()) {
- result.getMetaData().put(e.getKey(), e.getValue());
- }
- }
}
+
+ // https://issues.apache.org/jira/browse/NUTCH-1656
+ if (metaFromParse != null) {
+ for (Entry<Writable, Writable> e : metaFromParse.entrySet()) {
+ result.getMetaData().put(e.getKey(), e.getValue());
+ }
+ }
+
// if fetchInterval is larger than the system-wide maximum, trigger
// an unconditional recrawl. This prevents the page to be stuck at
// NOTMODIFIED state, when the old fetched copy was already removed with