panbingkun commented on code in PR #36350:
URL: https://github.com/apache/spark/pull/36350#discussion_r861385767
##########
core/src/main/scala/org/apache/spark/ErrorInfo.scala:
##########
@@ -80,9 +80,9 @@ private[spark] object SparkThrowableHelper {
val errorSubInfo = subClass.getOrElse(subErrorClass,
throw new IllegalArgumentException(s"Cannot find sub error class
'$subErrorClass'"))
val subMessageParameters = messageParameters.tail
- "[" + errorClass + "." + subErrorClass + "] " + errorInfo.messageFormat +
-
String.format(errorSubInfo.messageFormat.replaceAll("<[a-zA-Z0-9_-]+>", "%s"),
- subMessageParameters: _*)
+ "[" + errorClass + "." + subErrorClass + "] " +
String.format((errorInfo.messageFormat +
+ errorSubInfo.messageFormat).replaceAll("<[a-zA-Z0-9_-]+>", "%s"),
+ subMessageParameters: _*)
Review Comment:
1.
"UNSUPPORTED_SAVE_MODE" : {
"message" : [ "The save mode <saveMode> is not supported for: " ],
"subClass" : {
"EXISTENT_PATH" : {
"message" : [ "an existent path." ]
},
"NON_EXISTENT_PATH" : {
"message" : [ "a not existent path." ]
}
}
},
2.
https://github.com/panbingkun/spark/blob/master/core/src/main/scala/org/apache/spark/ErrorInfo.scala#L82~L91
3.
The placeHolder(eg. <saveMode>) in ErrorInfo's messageFormat need replace.
I think this is also necessary in other scenarios.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]