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

Diff of /lucene/nutch/trunk/src/java/org/apache/nutch/indexer/Indexer.java

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

--- lucene/nutch/trunk/src/java/org/apache/nutch/indexer/Indexer.java	2006/03/03 18:55:58	382911
+++ lucene/nutch/trunk/src/java/org/apache/nutch/indexer/Indexer.java	2006/03/03 19:05:41	382912
@@ -269,12 +269,12 @@ public class Indexer extends Configured
     LOG.info("Indexer: done");
   }
 
-  public static boolean doMain(String[] args) throws Exception {
+  public static void main(String[] args) throws Exception {
     Indexer indexer = new Indexer(NutchConfiguration.create());
     
     if (args.length < 4) {
       System.err.println("Usage: <index> <crawldb> <linkdb> <segment> ...");
-      return false;
+      return;
     }
     
     File[] segments = new File[args.length-3];
@@ -284,22 +284,6 @@ public class Indexer extends Configured
 
     indexer.index(new File(args[0]), new File(args[1]), new File(args[2]),
                   segments);
-
-    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