bozhang2820 commented on code in PR #36695:
URL: https://github.com/apache/spark/pull/36695#discussion_r893186365
##########
core/src/main/scala/org/apache/spark/security/SocketAuthHelper.scala:
##########
@@ -60,7 +61,7 @@ private[spark] class SocketAuthHelper(val conf: SparkConf) {
shouldClose = false
} else {
writeUtf8("err", s)
- throw new IllegalArgumentException("Authentication failed.")
+ throw SparkCoreErrors.authenticationFailedError("client")
Review Comment:
@cloud-fan, are we allowed to change the exception type here?
##########
core/src/main/scala/org/apache/spark/security/SocketAuthHelper.scala:
##########
@@ -60,7 +61,7 @@ private[spark] class SocketAuthHelper(val conf: SparkConf) {
shouldClose = false
} else {
writeUtf8("err", s)
- throw new IllegalArgumentException("Authentication failed.")
+ throw SparkCoreErrors.authenticationFailedError("client")
Review Comment:
Also let's not forget to update the `@throws` in the scaladoc, in both
`authClient` and `authToServer`.
--
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]