hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r709041 - in /hadoop/core/branches/branch-0.19: ./ CHANGES.txt src/core/org/apache/hadoop/util/ProgramDriver.java src/examples/org/apache/hadoop/examples/ExampleDriver.java src/mapred/org/apache/hadoop/mapred/JobShell.java
Date Wed, 29 Oct 2008 23:09:08 GMT
Author: acmurthy
Date: Wed Oct 29 16:09:07 2008
New Revision: 709041

URL: http://svn.apache.org/viewvc?rev=709041&view=rev
Log:
Merge -r 709039:709040 from trunk to branch-0.19 to fix HADOOP-4340.

Modified:
    hadoop/core/branches/branch-0.19/   (props changed)
    hadoop/core/branches/branch-0.19/CHANGES.txt   (contents, props changed)
    hadoop/core/branches/branch-0.19/src/core/org/apache/hadoop/util/ProgramDriver.java
    hadoop/core/branches/branch-0.19/src/examples/org/apache/hadoop/examples/ExampleDriver.java
    hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobShell.java

Propchange: hadoop/core/branches/branch-0.19/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 29 16:09:07 2008
@@ -1 +1 @@
-/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989,705391,705420,705430,705762,706350,706707,706719,706796,706802,707258,707262,708623,708641,708710
+/hadoop/core/trunk:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989,705391,705420,705430,705762,706350,706707,706719,706796,706802,707258,707262,708623,708641,708710,709040

Modified: hadoop/core/branches/branch-0.19/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/CHANGES.txt?rev=709041&r1=709040&r2=709041&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/CHANGES.txt (original)
+++ hadoop/core/branches/branch-0.19/CHANGES.txt Wed Oct 29 16:09:07 2008
@@ -1008,6 +1008,9 @@
     HADOOP-4483 Honor the max parameter in DatanodeDescriptor.getBlockArray(..)
     (Ahad Rana and Hairong Kuang via szetszwo)
 
+    HADOOP-4340. Correctly set the exit code from JobShell.main so that the
+    'hadoop jar' command returns the right code to the user. (acmurthy)
+
   NEW FEATURES
 
     HADOOP-2421.  Add jdiff output to documentation, listing all API

Propchange: hadoop/core/branches/branch-0.19/CHANGES.txt
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 29 16:09:07 2008
@@ -1 +1 @@
-/hadoop/core/trunk/CHANGES.txt:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989,705391,705420,705430,705762,706350,706707,706719,706796,706802,707258,707262,708623,708641,708710,708723
+/hadoop/core/trunk/CHANGES.txt:697306,698176,699056,699098,699415,699424,699444,699490,699517,700163,700628,700923,701273,701398,703923,704203,704261,704701,704703,704707,704712,704732,704748,704989,705391,705420,705430,705762,706350,706707,706719,706796,706802,707258,707262,708623,708641,708710,708723,709040

Modified: hadoop/core/branches/branch-0.19/src/core/org/apache/hadoop/util/ProgramDriver.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/core/org/apache/hadoop/util/ProgramDriver.java?rev=709041&r1=709040&r2=709041&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/core/org/apache/hadoop/util/ProgramDriver.java (original)
+++ hadoop/core/branches/branch-0.19/src/core/org/apache/hadoop/util/ProgramDriver.java Wed
Oct 29 16:09:07 2008
@@ -120,7 +120,8 @@
       System.out.println("An example program must be given as the" + 
                          " first argument.");
       printUsage(programs);
-      return;
+      throw new IllegalArgumentException("An example program must be given " +
+      		                               "as the first argument.");
     }
 	
     // And that it is good.
@@ -128,7 +129,8 @@
     if (pgm == null) {
       System.out.println("Unknown program '" + args[0] + "' chosen.");
       printUsage(programs);
-      return;
+      throw new IllegalArgumentException("Unknown program '" + args[0] + 
+                                         "' chosen.");
     }
 	
     // Remove the leading argument and call main

Modified: hadoop/core/branches/branch-0.19/src/examples/org/apache/hadoop/examples/ExampleDriver.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/examples/org/apache/hadoop/examples/ExampleDriver.java?rev=709041&r1=709040&r2=709041&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/examples/org/apache/hadoop/examples/ExampleDriver.java
(original)
+++ hadoop/core/branches/branch-0.19/src/examples/org/apache/hadoop/examples/ExampleDriver.java
Wed Oct 29 16:09:07 2008
@@ -31,6 +31,7 @@
 public class ExampleDriver {
   
   public static void main(String argv[]){
+    int exitCode = -1;
     ProgramDriver pgd = new ProgramDriver();
     try {
       pgd.addClass("wordcount", WordCount.class, 
@@ -58,10 +59,15 @@
       pgd.addClass("terasort", TeraSort.class, "Run the terasort");
       pgd.addClass("teravalidate", TeraValidate.class, "Checking results of terasort");
       pgd.driver(argv);
+      
+      // Success
+      exitCode = 0;
     }
     catch(Throwable e){
       e.printStackTrace();
     }
+    
+    System.exit(exitCode);
   }
 }
 	

Modified: hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobShell.java
URL: http://svn.apache.org/viewvc/hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobShell.java?rev=709041&r1=709040&r2=709041&view=diff
==============================================================================
--- hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobShell.java (original)
+++ hadoop/core/branches/branch-0.19/src/mapred/org/apache/hadoop/mapred/JobShell.java Wed
Oct 29 16:09:07 2008
@@ -65,6 +65,7 @@
   
   public static void main(String[] argv) throws Exception {
     JobShell jshell = new JobShell();
-    ToolRunner.run(jshell, argv);
+    int status = ToolRunner.run(jshell, argv);
+    System.exit(status);
   }
 }



Mime
View raw message