Skip to content

Commit

Permalink
[SPARK-49388] Remove SPARK_NO_DAEMONIZE in favor of live log UIs
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

This PR aims to remove `SPARK_NO_DAEMONIZE` in favor of live log UIs.
- apache/spark#44890
- apache/spark#44888

### Why are the changes needed?

Spark Master/Worker supports live log UIs already. A user doesn't need to use `kubectl` to access K8s log.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Manual review.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #103 from dongjoon-hyun/SPARK-49388.

Authored-by: Dongjoon Hyun <dongjoon@apache.org>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
dongjoon-hyun committed Aug 26, 2024
1 parent 7371e1d commit 6629764
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,14 @@ private static StatefulSet buildMasterStatefulSet(
.withName("master")
.withImage(image)
.addNewEnv()
.withName("SPARK_NO_DAEMONIZE")
.withValue("1")
.endEnv()
.addNewEnv()
.withName("SPARK_MASTER_OPTS")
.withValue(options)
.endEnv()
.addToCommand("bash")
.addToArgs("/opt/spark/sbin/start-master.sh")
.addToArgs(
"-c",
"/opt/spark/sbin/start-master.sh && while /opt/spark/sbin/spark-daemon.sh status "
+ "org.apache.spark.deploy.master.Master 1; do sleep 1; done")
.addNewPort()
.withName("web")
.withContainerPort(8080)
Expand Down Expand Up @@ -240,15 +239,20 @@ private static StatefulSet buildWorkerStatefulSet(
.withName("worker")
.withImage(image)
.addNewEnv()
.withName("SPARK_NO_DAEMONIZE")
.withValue("1")
.withName("SPARK_LOG_DIR")
.withValue("/opt/spark/work/logs")
.endEnv()
.addNewEnv()
.withName("SPARK_WORKER_OPTS")
.withValue(options)
.endEnv()
.addToCommand("bash")
.addToArgs("/opt/spark/sbin/start-worker.sh", "spark://" + name + "-master-svc:7077")
.addToArgs(
"-c",
"/opt/spark/sbin/start-worker.sh spark://"
+ name
+ "-master-svc:7077 && while /opt/spark/sbin/spark-daemon.sh status "
+ "org.apache.spark.deploy.worker.Worker 1; do sleep 1; done")
.endContainer()
.endSpec()
.endTemplate()
Expand Down

0 comments on commit 6629764

Please sign in to comment.