Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

fix for NUTCH-1911 Imeprove DomainStatistics tool command line parsing contributed by Michael Joyce <[email protected]> this closes #21.

Chris Mattmann7ea5160bcb72
diff --git a/CHANGES.txt b/CHANGES.txt
index 1b45ec80d..9493e3655 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,8 @@ Nutch Change Log
Nutch Current Development 1.10-SNAPSHOT
+* NUTCH-1911 Imeprove DomainStatistics tool command line parsing (Michael Joyce via mattmann)
+
* NUTCH-1981 Upgrade to icu4j 55.1 (Marko Asplund via snagel)
* NUTCH-1960 JUnit test for dump method of CommonCrawlDataDumper (Giuseppe Totaro via mattmann)
diff --git a/src/java/org/apache/nutch/util/domain/DomainStatistics.java b/src/java/org/apache/nutch/util/domain/DomainStatistics.java
index b9bd21ff4..d31b352f6 100644
--- a/src/java/org/apache/nutch/util/domain/DomainStatistics.java
+++ b/src/java/org/apache/nutch/util/domain/DomainStatistics.java
@@ -67,8 +67,20 @@ public class DomainStatistics extends Configured implements Tool {
public int run(String[] args) throws Exception {
if (args.length < 3) {
- System.out
- .println("usage: DomainStatistics inputDirs outDir host|domain|suffix|tld [numOfReducer]");
+ System.err.println("Usage: DomainStatistics inputDirs outDir mode [numOfReducer]");
+
+ System.err.println("\tinputDirs\tComma separated list of crawldb input directories");
+ System.err.println("\t\t\tE.g.: crawl/crawldb/current/");
+
+ System.err.println("\toutDir\t\tOutput directory where results should be dumped");
+
+ System.err.println("\tmode\t\tSet statistics gathering mode");
+ System.err.println("\t\t\t\thost\tGather statistics by host");
+ System.err.println("\t\t\t\tdomain\tGather statistics by domain");
+ System.err.println("\t\t\t\tsuffix\tGather statistics by suffix");
+ System.err.println("\t\t\t\ttld\tGather statistics by top level directory");
+
+ System.err.println("\t[numOfReducers]\tOptional number of reduce jobs to use. Defaults to 1.");
return 1;
}
String inputDir = args[0];