AngersZhuuuu commented on code in PR #40314:
URL: https://github.com/apache/spark/pull/40314#discussion_r1128899260
##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:
##########
@@ -1005,17 +1005,20 @@ private[spark] class SparkSubmit extends Logging {
e
}
+ var exitCode = 0
+
try {
app.start(childArgs.toArray, sparkConf)
} catch {
case t: Throwable =>
+ exitCode = -1
throw findCause(t)
} finally {
if (args.master.startsWith("k8s") && !isShell(args.primaryResource) &&
!isSqlShell(args.mainClass) && !isThriftServer(args.mainClass) &&
!isConnectServer(args.mainClass)) {
try {
- SparkContext.getActive.foreach(_.stop())
+ SparkContext.getActive.foreach(_.stop(exitCode))
Review Comment:
Code in spark-3.1.2 is
```
if (!isShell(args.primaryResource) && !isSqlShell(args.mainClass) &&
!isThriftServer(args.mainClass)) {
```
Seems https://github.com/apache/spark/pull/33403 change the behavior
--
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]