You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/08/02 21:47:47 UTC

[GitHub] [hadoop] ayushtkn commented on a diff in pull request #4671: HDFS-16702. MiniDFSCluster should report cause of exception in assertion error

ayushtkn commented on code in PR #4671:
URL: https://github.com/apache/hadoop/pull/4671#discussion_r936053862


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExitUtil.java:
##########
@@ -94,7 +94,12 @@ public String toString() {
       if (message == null) {
         message = super.toString();
       }
-      return Integer.toString(status) + ": " + message;
+      String finalString = status + ": " + message;
+      Throwable cause = getCause();
+      if (cause != null) {
+        finalString = finalString + " : \n" + "cause: " + cause.getMessage();
+      }
+      return finalString;

Review Comment:
   Are we changing the response string, I am not sure about the compatibility here.
   The above javadoc says
   ```
   String value does not include exception type, just exit code and message.
   ```
   We shouldn't make prod level API changes for MiniDFSCluster



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org