You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2014/07/03 13:28:02 UTC
svn commit: r1607591 - in
/hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt
src/main/java/ src/main/java/org/apache/hadoop/util/Shell.java
Author: stevel
Date: Thu Jul 3 11:28:02 2014
New Revision: 1607591
URL: http://svn.apache.org/r1607591
Log:
HADOOP-10312 Shell.ExitCodeException to have more useful toString
Modified:
hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (contents, props changed)
hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/ (props changed)
hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.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=1607591&r1=1607590&r2=1607591&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Thu Jul 3 11:28:02 2014
@@ -685,6 +685,8 @@ Release 2.5.0 - UNRELEASED
HADOOP-10710. hadoop.auth cookie is not properly constructed according to
RFC2109. (Juan Yu via tucu)
+ HADOOP-10312 Shell.ExitCodeException to have more useful toString (stevel)
+
Release 2.4.1 - 2014-06-23
INCOMPATIBLE CHANGES
Propchange: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
------------------------------------------------------------------------------
Merged /hadoop/common/branches/branch-2.5/hadoop-common-project/hadoop-common/CHANGES.txt:r1607590
Propchange: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/
------------------------------------------------------------------------------
Merged /hadoop/common/branches/branch-2.5/hadoop-common-project/hadoop-common/src/main/java:r1607590
Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java?rev=1607591&r1=1607590&r2=1607591&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java Thu Jul 3 11:28:02 2014
@@ -621,7 +621,7 @@ abstract public class Shell {
* This is an IOException with exit code added.
*/
public static class ExitCodeException extends IOException {
- int exitCode;
+ private final int exitCode;
public ExitCodeException(int exitCode, String message) {
super(message);
@@ -631,6 +631,16 @@ abstract public class Shell {
public int getExitCode() {
return exitCode;
}
+
+ @Override
+ public String toString() {
+ final StringBuilder sb =
+ new StringBuilder("ExitCodeException ");
+ sb.append("exitCode=").append(exitCode)
+ .append(": ");
+ sb.append(super.getMessage());
+ return sb.toString();
+ }
}
/**