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

Diff of /lucene/nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java

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

--- lucene/nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java	2006/03/03 18:55:58	382911
+++ lucene/nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java	2006/03/03 19:05:41	382912
@@ -369,13 +369,13 @@ public class Fetcher extends Configured
 
 
   /** Run the fetcher. */
-  public static boolean doMain(String[] args) throws Exception {
+  public static void main(String[] args) throws Exception {
 
     String usage = "Usage: Fetcher <segment> [-threads n] [-noParsing]";
 
     if (args.length < 1) {
       System.err.println(usage);
-      return false;
+      System.exit(-1);
     }
       
     File segment = new File(args[0]);
@@ -399,21 +399,5 @@ public class Fetcher extends Configured
     
     fetcher.fetch(segment, threads, parsing);              // run the Fetcher
 
-    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