Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/java/org/apache/nutch/crawl/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -974,10 +974,13 @@ public Path[] generate(Path dbDir, Path segments, int numLists, long topN,
}

LOG.info("Generator: number of items rejected during selection:");
for (Counter counter : job.getCounters().getGroup("Generator")) {
LOG.info("Generator: {} {}",
String.format(Locale.ROOT, "%6d", counter.getValue()),
counter.getName());
for (Counter counter : job.getCounters()
.getGroup(NutchMetrics.GROUP_GENERATOR)) {
long counterValue = counter.getValue();
if (counterValue > 0) {
LOG.info("Generator: {} {}",
String.format(Locale.ROOT, "%6d", counterValue), counter.getName());
}
}
if (!getConf().getBoolean(GENERATE_UPDATE_CRAWLDB, false)) {
/*
Expand Down
13 changes: 9 additions & 4 deletions src/java/org/apache/nutch/indexer/IndexingJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

import org.apache.commons.lang3.time.StopWatch;
import org.apache.nutch.metadata.Nutch;
import org.apache.nutch.metrics.NutchMetrics;
import org.apache.nutch.segment.SegmentChecker;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
Expand Down Expand Up @@ -155,10 +156,14 @@ public void index(Path crawlDb, Path linkDb, List<Path> segments,
throw e;
}
LOG.info("Indexer: number of documents indexed, deleted, or skipped:");
for (Counter counter : job.getCounters().getGroup("IndexerStatus")) {
LOG.info("Indexer: {} {}",
String.format(Locale.ROOT, "%6d", counter.getValue()),
counter.getName());
for (Counter counter : job.getCounters()
.getGroup(NutchMetrics.GROUP_INDEXER)) {
long counterValue = counter.getValue();
if (counterValue > 0) {
LOG.info("Indexer: {} {}",
String.format(Locale.ROOT, "%6d", counterValue),
counter.getName());
}
}
stopWatch.stop();
LOG.info("Indexer: finished, elapsed: {} ms", stopWatch.getTime(
Expand Down