/[Apache-SVN]/lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java
ViewVC logotype

Diff of /lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java	2006/03/03 18:55:58	382911
+++ lucene/nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java	2006/03/03 19:05:41	382912
@@ -20,7 +20,7 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.TreeMap;
-import java.util.logging.*;
+import java.util.logging.Logger;
 
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.io.LongWritable;
@@ -241,7 +241,7 @@ public class CrawlDbReader {
     JobClient.runJob(job);
   }
 
-  public static boolean doMain(String[] args) throws IOException {
+  public static void main(String[] args) throws IOException {
     CrawlDbReader dbr = new CrawlDbReader();
 
     if (args.length < 1) {
@@ -250,7 +250,7 @@ public class CrawlDbReader {
       System.err.println("\t-stats\tprint overall statistics to System.out");
       System.err.println("\t-dump <out_dir>\tdump the whole db to a text file in <out_dir>");
       System.err.println("\t-url <url>\tprint information on <url> to System.out");
-      return false;
+      return;
     }
     String param = null;
     String crawlDb = args[0];
@@ -266,24 +266,8 @@ public class CrawlDbReader {
         dbr.readUrl(crawlDb, param, conf);
       } else {
         System.err.println("\nError: wrong argument " + args[i]);
-        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