hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r819836 - in /hadoop/common/branches/branch-0.20: CHANGES.txt src/tools/org/apache/hadoop/tools/HadoopArchives.java
Date Tue, 29 Sep 2009 06:13:55 GMT
Author: mahadev
Date: Tue Sep 29 06:13:54 2009
New Revision: 819836

URL: http://svn.apache.org/viewvc?rev=819836&view=rev
Log:
MAPREDUCE-826. harchive doesn't use ToolRunner / harchive returns 0 even if the job fails
with exception (koji via mahadev)

Modified:
    hadoop/common/branches/branch-0.20/CHANGES.txt
    hadoop/common/branches/branch-0.20/src/tools/org/apache/hadoop/tools/HadoopArchives.java

Modified: hadoop/common/branches/branch-0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/CHANGES.txt?rev=819836&r1=819835&r2=819836&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.20/CHANGES.txt Tue Sep 29 06:13:54 2009
@@ -10,6 +10,9 @@
     HADOOP-6231.  Allow caching of filesystem instances to be disabled on a
     per-instance basis (Tom White and Ben Slusky via mahadev)
 
+    MAPREDUCE-826. harchive doesn't use ToolRunner / harchive returns 0 even
+    if the job fails with exception (koji via mahadev)
+
 Release 0.20.1 - 2009-09-01
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-0.20/src/tools/org/apache/hadoop/tools/HadoopArchives.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20/src/tools/org/apache/hadoop/tools/HadoopArchives.java?rev=819836&r1=819835&r2=819836&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.20/src/tools/org/apache/hadoop/tools/HadoopArchives.java
(original)
+++ hadoop/common/branches/branch-0.20/src/tools/org/apache/hadoop/tools/HadoopArchives.java
Tue Sep 29 06:13:54 2009
@@ -675,11 +675,16 @@
   public static void main(String[] args) {
     JobConf job = new JobConf(HadoopArchives.class);
     HadoopArchives harchives = new HadoopArchives(job);
-    try {
-      int res = harchives.run(args);
-      System.exit(res);
+    int ret = 0;
+
+    try{
+      ret = ToolRunner.run(harchives, args);
     } catch(Exception e) {
+      LOG.debug("Exception in archives  ", e);
+      System.err.println("Exception in archives");
       System.err.println(e.getLocalizedMessage());
+      System.exit(1);
     }
+    System.exit(ret);
   }
 }



Mime
View raw message