AngersZhuuuu commented on code in PR #40314:
URL: https://github.com/apache/spark/pull/40314#discussion_r1128902772
##########
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:
I don't know too much about K8S scheduler, but for yarn client mode we also
need to keep a same exit code.
--
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]