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

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

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

--- lucene/nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java	2006/03/03 18:55:58	382911
+++ lucene/nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java	2006/03/03 19:05:41	382912
@@ -237,10 +237,10 @@ public class Generator extends Configure
   /**
    * Generate a fetchlist from the pagedb and linkdb
    */
-  public static boolean doMain(String args[]) throws Exception {
+  public static void main(String args[]) throws Exception {
     if (args.length < 2) {
       System.out.println("Usage: Generator <crawldb> <segments_dir> [-topN N] [-numFetchers numFetchers] [-adddays numDays]");
-      return false;
+      return;
     }
 
     File dbDir = new File(args[0]);
@@ -266,22 +266,5 @@ public class Generator extends Configure
       LOG.info("topN: " + topN);
     Generator gen = new Generator(NutchConfiguration.create());
     gen.generate(dbDir, segmentsDir, numFetchers, topN, curTime);
-
-    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);
-    }
   }
 }

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26