Skip to content

Commit 2ba8722

Browse files
committed
[SPARK-53739] Add pi-preview-with-eventlog.yaml example
### What changes were proposed in this pull request? This PR aims to add `pi-preview-with-eventlog.yaml` example. ### Why are the changes needed? To show how to use `Apache Spark 4.1.0-preview2` properly. Mainly, we have three difference. 1. Hadoop versions are different. ``` - spark.jars.packages: "org.apache.hadoop:hadoop-aws:3.4.1" + spark.jars.packages: "org.apache.hadoop:hadoop-aws:3.4.2" ``` 2. Spark 4.1.0-preview2 with Hadoop 3.4.2 requires more memory. ``` spark.driver.memory: "2g" ``` 3. Docker images are different. ``` - spark.kubernetes.container.image: "apache/spark:4.0.1-java21-scala" + spark.kubernetes.container.image: "apache/spark:4.1.0-preview2-java21-scala" ``` ### Does this PR introduce _any_ user-facing change? No behavior change because this is an example. ### How was this patch tested? Manually because this is an example. Since `4.1.0-preview2` image is not published yet, I built the image locally and used it. ``` $ ./bin/docker-image-tool.sh -r docker.io/apache -t 4.1.0-preview2-java21-scala build ``` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #353 from dongjoon-hyun/SPARK-53739. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 84a2fb0 commit 2ba8722

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
apiVersion: spark.apache.org/v1
16+
kind: SparkApplication
17+
metadata:
18+
name: pi-preview-with-eventlog
19+
spec:
20+
mainClass: "org.apache.spark.examples.SparkPi"
21+
jars: "local:///opt/spark/examples/jars/spark-examples.jar"
22+
sparkConf:
23+
spark.jars.packages: "org.apache.hadoop:hadoop-aws:3.4.2"
24+
spark.jars.ivy: "/tmp/.ivy2.5.2"
25+
spark.dynamicAllocation.enabled: "true"
26+
spark.dynamicAllocation.shuffleTracking.enabled: "true"
27+
spark.dynamicAllocation.maxExecutors: "3"
28+
spark.kubernetes.authenticate.driver.serviceAccountName: "spark"
29+
spark.kubernetes.container.image: "apache/spark:4.1.0-preview2-java21-scala"
30+
spark.eventLog.enabled: "true"
31+
spark.eventLog.dir: "s3a://spark-events/"
32+
spark.hadoop.fs.s3a.endpoint: "http://localstack:4566"
33+
spark.hadoop.fs.s3a.path.style.access: "true"
34+
spark.hadoop.fs.s3a.access.key: "test"
35+
spark.hadoop.fs.s3a.secret.key: "test"
36+
spark.driver.memory: "2g"
37+
applicationTolerations:
38+
resourceRetainPolicy: OnFailure
39+
runtimeVersions:
40+
sparkVersion: "4.1.0-preview2"

0 commit comments

Comments
 (0)