Apache Nutch is an extensible and scalable web crawler
NUTCH-1203 ParseSegment to show number of milliseconds per parse
Markus Jelsma8874c82546e0
diff --git a/CHANGES.txt b/CHANGES.txtindex 4c939114f..297766bc0 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -1,5 +1,9 @@Nutch Change Log+* NUTCH-1203 ParseSegment to show number of milliseconds per parse (markus)++* NUTCH-1174 Outlinks are not properly normalized (markus)+* NUTCH-1185 Decrease solr.commit.size to 250 (markus)* NUTCH-1180 UpdateDB to backup previous CrawlDB (markus)diff --git a/src/java/org/apache/nutch/parse/ParseSegment.java b/src/java/org/apache/nutch/parse/ParseSegment.javaindex 810091236..7834f25b9 100644--- a/src/java/org/apache/nutch/parse/ParseSegment.java+++ b/src/java/org/apache/nutch/parse/ParseSegment.java@@ -94,7 +94,8 @@ public class ParseSegment extends Configured implements Tool,Parse parse = entry.getValue();ParseStatus parseStatus = parse.getData().getStatus();- LOG.info("Parsing: " + url);+ long start = System.currentTimeMillis();+reporter.incrCounter("ParserStatus", ParseStatus.majorCodes[parseStatus.getMajorCode()], 1);if (!parseStatus.isSuccess()) {@@ -120,6 +121,10 @@ public class ParseSegment extends Configured implements Tool,LOG.warn("Error passing score: "+ url +": "+e.getMessage());}}++ long end = System.currentTimeMillis();+ LOG.info("Parsed (" + Long.toString(end - start) + "ms):" + url);+output.collect(url, new ParseImpl(new ParseText(parse.getText()),parse.getData(), parse.isCanonical()));}