hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1376622 - /hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
Date Thu, 23 Aug 2012 18:09:16 GMT
Author: bobby
Date: Thu Aug 23 18:09:14 2012
New Revision: 1376622

URL: http://svn.apache.org/viewvc?rev=1376622&view=rev
Log:
svn merge -c 1376618 FIXES: HADOOP-8225. DistCp fails when invoked by Oozie (daryn via bobby)

Modified:
    hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java

Modified: hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java?rev=1376622&r1=1376621&r2=1376622&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
(original)
+++ hadoop/common/branches/branch-2.1.0-alpha/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCp.java
Thu Aug 23 18:09:14 2012
@@ -359,18 +359,20 @@ public class DistCp extends Configured i
    * @param argv Command-line arguments sent to DistCp.
    */
   public static void main(String argv[]) {
+    int exitCode;
     try {
       DistCp distCp = new DistCp();
       Cleanup CLEANUP = new Cleanup(distCp);
 
       ShutdownHookManager.get().addShutdownHook(CLEANUP,
         SHUTDOWN_HOOK_PRIORITY);
-      System.exit(ToolRunner.run(getDefaultConf(), distCp, argv));
+      exitCode = ToolRunner.run(getDefaultConf(), distCp, argv);
     }
     catch (Exception e) {
       LOG.error("Couldn't complete DistCp operation: ", e);
-      System.exit(DistCpConstants.UNKNOWN_ERROR);
+      exitCode = DistCpConstants.UNKNOWN_ERROR;
     }
+    System.exit(exitCode);
   }
 
   /**



Mime
View raw message