hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r814738 - in /hadoop/mapreduce/trunk: CHANGES.txt src/tools/org/apache/hadoop/tools/HadoopArchives.java
Date Mon, 14 Sep 2009 17:14:32 GMT
Author: mahadev
Date: Mon Sep 14 17:14:31 2009
New Revision: 814738

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

Modified:
    hadoop/mapreduce/trunk/CHANGES.txt
    hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/HadoopArchives.java

Modified: hadoop/mapreduce/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/CHANGES.txt?rev=814738&r1=814737&r2=814738&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/CHANGES.txt (original)
+++ hadoop/mapreduce/trunk/CHANGES.txt Mon Sep 14 17:14:31 2009
@@ -584,3 +584,7 @@
 
     MAPREDUCE-968. NPE in distcp encountered when placing _logs directory on
     S3FileSystem. (Aaron Kimball via tomwhite)
+ 
+    MAPREDUCE-826. harchive doesn't use ToolRunner / harchive returns 0 even
+    if the job fails with exception (koji Noguchi via mahadev)
+

Modified: hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/HadoopArchives.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/HadoopArchives.java?rev=814738&r1=814737&r2=814738&view=diff
==============================================================================
--- hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/HadoopArchives.java (original)
+++ hadoop/mapreduce/trunk/src/tools/org/apache/hadoop/tools/HadoopArchives.java Mon Sep 14
17:14:31 2009
@@ -744,11 +744,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