Skip to content

Commit fc37cf3

Browse files
committed
NUTCH-669 - Consolidate code for Fetcher and Fetcher2
git-svn-id: https://svn.apache.org/repos/asf/lucene/nutch/trunk@749289 13f79535-47bb-0310-9956-ffa450edef68
1 parent c487bf7 commit fc37cf3

6 files changed

Lines changed: 608 additions & 1175 deletions

File tree

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ Unreleased changes (1.0-dev)
372372

373373
139. NUTCH-700 - Neko1.9.11 goes into a loop (Julien Nioche, siren)
374374

375+
140. NUTCH-669 - Consolidate code for Fetcher and Fetcher2 (siren)
376+
375377

376378
Release 0.9 - 2007-04-02
377379

bin/nutch

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ if [ $# = 0 ]; then
4141
echo " generate generate new segments to fetch from crawl db"
4242
echo " freegen generate new segments to fetch from text files"
4343
echo " fetch fetch a segment's pages"
44-
echo " fetch2 fetch a segment's pages using Fetcher2 implementation"
4544
echo " parse parse a segment's pages"
4645
echo " readseg read / dump segment data"
4746
echo " mergesegs merge several segments, with optional filtering and slicing"

src/java/org/apache/nutch/crawl/Crawl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.apache.commons.logging.Log;
2525
import org.apache.commons.logging.LogFactory;
2626

27-
import org.apache.nutch.fetcher.Fetcher;
2827
import org.apache.hadoop.fs.*;
2928
import org.apache.hadoop.conf.*;
3029
import org.apache.hadoop.mapred.*;
@@ -36,6 +35,8 @@
3635
import org.apache.nutch.util.NutchConfiguration;
3736
import org.apache.nutch.util.NutchJob;
3837

38+
import org.apache.nutch.fetcher.Fetcher;
39+
3940
public class Crawl {
4041
public static final Log LOG = LogFactory.getLog(Crawl.class);
4142

@@ -118,7 +119,7 @@ public static void main(String args[]) throws Exception {
118119
LOG.info("Stopping at depth=" + i + " - no more URLs to fetch.");
119120
break;
120121
}
121-
fetcher.fetch(segment, threads); // fetch it
122+
fetcher.fetch(segment, threads, org.apache.nutch.fetcher.Fetcher.isParsing(conf)); // fetch it
122123
if (!Fetcher.isParsing(job)) {
123124
parseSegment.parse(segment); // parse it, if needed
124125
}

0 commit comments

Comments
 (0)