hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1387273 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/util/ExitUtil.java
Date Tue, 18 Sep 2012 17:32:02 GMT
Author: eli
Date: Tue Sep 18 17:32:01 2012
New Revision: 1387273

URL: http://svn.apache.org/viewvc?rev=1387273&view=rev
Log:
HADOOP-8812. ExitUtil#terminate should print Exception#toString. Contributed by Eli Collins

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1387273&r1=1387272&r2=1387273&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Tue Sep 18 17:32:01
2012
@@ -238,6 +238,8 @@ Release 2.0.3-alpha - Unreleased 
     HADOOP-8806. libhadoop.so: dlopen should be better at locating
     libsnappy.so, etc. (Colin Patrick McCabe via eli)
 
+    HADOOP-8812. ExitUtil#terminate should print Exception#toString. (eli)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java?rev=1387273&r1=1387272&r2=1387273&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java
Tue Sep 18 17:32:01 2012
@@ -17,9 +17,6 @@
  */
 package org.apache.hadoop.util;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
@@ -104,10 +101,7 @@ public final class ExitUtil {
    * @throws ExitException if System.exit is disabled for test purposes
    */
   public static void terminate(int status, Throwable t) throws ExitException {
-    StringWriter sw = new StringWriter();
-    t.printStackTrace(new PrintWriter(sw));
-    terminate(status, "Fatal exception with message " + t.getMessage() +
-        "\nstack trace\n" + sw.toString());
+    terminate(status, StringUtils.stringifyException(t));
   }
 
   /**



Mime
View raw message