Parent Directory | Revision Log | Patch
--- lucene/nutch/trunk/src/java/org/apache/nutch/crawl/LinkDbReader.java 2006/03/03 18:55:58 382911 +++ lucene/nutch/trunk/src/java/org/apache/nutch/crawl/LinkDbReader.java 2006/03/03 19:05:41 382912 @@ -29,7 +29,7 @@ import org.apache.hadoop.conf.Configurat import org.apache.nutch.util.NutchConfiguration; import org.apache.nutch.util.NutchJob; -import java.util.logging.*; +import java.util.logging.Logger; /** . */ public class LinkDbReader implements Closeable { @@ -96,12 +96,12 @@ public class LinkDbReader implements Clo JobClient.runJob(job); } - public static boolean doMain(String[] args) throws Exception { + public static void main(String[] args) throws Exception { if (args.length < 2) { System.err.println("LinkDbReader <linkdb> {-dump <out_dir> | -url <url>)"); System.err.println("\t-dump <out_dir>\tdump whole link db to a text file in <out_dir>"); System.err.println("\t-url <url>\tprint information about <url> to System.out"); - return false; + return; } Configuration conf = NutchConfiguration.create(); if (args[1].equals("-dump")) { @@ -118,24 +118,7 @@ public class LinkDbReader implements Clo } } else { System.err.println("Error: wrong argument " + args[1]); - return false; - } - - return true; - } - - /** - * main() wrapper that returns proper exit status - */ - public static void main(String[] args) { - Runtime rt = Runtime.getRuntime(); - try { - boolean status = doMain(args); - rt.exit(status ? 0 : 1); - } - catch (Exception e) { - LOG.log(Level.SEVERE, "error, caught Exception in main()", e); - rt.exit(1); + return; } } }
infrastructure at apache.org | ViewVC Help |
Powered by ViewVC 1.1.26 |