viirya commented on code in PR #59878:
URL: https://github.com/apache/spark/pull/59878#discussion_r4405981651
##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:
##########
@@ -313,8 +313,12 @@ private[spark] class SparkSubmit extends Logging {
case (YARN, CLUSTER) if isConnectServer(args.mainClass) =>
logInfo("SparkConnectServer is starting in cluster deploy mode. " +
"Use `yarn application -kill` command or YARN client API to stop the
server.")
+ case (KUBERNETES, CLUSTER) if isConnectServer(args.mainClass) =>
+ logInfo("SparkConnectServer is starting in cluster deploy mode. " +
+ "Use `kubectl delete` command to delete the driver pod to stop the
server.")
Review Comment:
Deleting the driver pod does clean everything up, because the driver
service, the config maps and the executor pods all carry owner references to
it. Two suggestions for this message, though:
1. `spark-submit --kill <namespace>:<driver-pod-name> --master k8s://...` is
the closer counterpart to `yarn application -kill`. It also doesn't require
`kubectl` and pod-delete RBAC on the user's side. @pan3793 pointed to it in
#54004. Could the message mention it, either in place of `kubectl delete` or
alongside it?
2. Unlike the YARN client, which logs at INFO only on state changes,
`LoggingPodStatusWatcherImpl` logs at INFO every
`spark.kubernetes.report.interval` (1s by default). It keeps doing that for as
long as the server runs. With `sbin/start-connect-server.sh`, that launcher
stays alive under `spark-daemon.sh`, so the daemon log grows for the server's
whole lifetime. Stopping it with `sbin/stop-connect-server.sh` only kills the
local launcher, not the driver pod. Pointing to
`spark.kubernetes.submission.waitAppCompletion=false` here would help.
For example:
```scala
logInfo("SparkConnectServer is starting in cluster deploy mode. " +
"Use `spark-submit --kill <namespace>:<driver-pod-name>` or delete
the driver pod " +
"to stop the server. Consider setting " +
"spark.kubernetes.submission.waitAppCompletion=false so that this
launcher " +
"does not keep running and logging the driver pod status.")
```
##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:
##########
@@ -313,8 +313,12 @@ private[spark] class SparkSubmit extends Logging {
case (YARN, CLUSTER) if isConnectServer(args.mainClass) =>
logInfo("SparkConnectServer is starting in cluster deploy mode. " +
"Use `yarn application -kill` command or YARN client API to stop the
server.")
+ case (KUBERNETES, CLUSTER) if isConnectServer(args.mainClass) =>
+ logInfo("SparkConnectServer is starting in cluster deploy mode. " +
+ "Use `kubectl delete` command to delete the driver pod to stop the
server.")
case (_, CLUSTER) if isConnectServer(args.mainClass) =>
- error("Launching Spark Connect server in cluster deploy mode is
supported only for YARN")
+ error("Launching Spark Connect server in cluster deploy mode is
supported only for YARN" +
+ " or KUBERNETES")
Review Comment:
nit: since only standalone ends up here now, maybe:
```suggestion
error("Launching Spark Connect server in cluster deploy mode is
supported only for " +
"YARN and Kubernetes")
```
--
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]