This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/spark-kubernetes-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 5f9b23f [SPARK-52512] Add `pi-with-eventlog` example
5f9b23f is described below
commit 5f9b23f070680910edd043a21252a96753503a66
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Tue Jun 17 09:30:39 2025 -0700
[SPARK-52512] Add `pi-with-eventlog` example
### What changes were proposed in this pull request?
This PR aims to add an event-log enabled `SparkPi` example.
### Why are the changes needed?
To provide a rich example about how to use the event logs and SHS.
### Does this PR introduce _any_ user-facing change?
No behavior change.
### How was this patch tested?
Manually.
```
$ kubectl get sparkapp
NAME CURRENT STATE AGE
pi-with-eventlog ResourceReleased 3m23s
spark-history-server RunningHealthy 6m31s
```

### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #250 from dongjoon-hyun/SPARK-52512.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
examples/pi-with-eventlog.yaml | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/examples/pi-with-eventlog.yaml b/examples/pi-with-eventlog.yaml
new file mode 100644
index 0000000..b3bf251
--- /dev/null
+++ b/examples/pi-with-eventlog.yaml
@@ -0,0 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: spark.apache.org/v1beta1
+kind: SparkApplication
+metadata:
+ name: pi-with-eventlog
+spec:
+ mainClass: "org.apache.spark.examples.SparkPi"
+ jars: "local:///opt/spark/examples/jars/spark-examples.jar"
+ sparkConf:
+ spark.jars.packages: "org.apache.hadoop:hadoop-aws:3.4.1"
+ spark.jars.ivy: "/tmp/.ivy2.5.2"
+ spark.dynamicAllocation.enabled: "true"
+ spark.dynamicAllocation.shuffleTracking.enabled: "true"
+ spark.dynamicAllocation.maxExecutors: "3"
+ spark.kubernetes.authenticate.driver.serviceAccountName: "spark"
+ spark.kubernetes.container.image: "apache/spark:4.0.0-java21-scala"
+ spark.eventLog.enabled: "true"
+ spark.eventLog.dir: "s3a://spark-events/"
+ spark.hadoop.fs.s3a.endpoint: "http://localstack:4566"
+ spark.hadoop.fs.s3a.path.style.access: "true"
+ spark.hadoop.fs.s3a.access.key: "test"
+ spark.hadoop.fs.s3a.secret.key: "test"
+ applicationTolerations:
+ resourceRetainPolicy: OnFailure
+ runtimeVersions:
+ sparkVersion: "4.0.0"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]