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 24f66ec [SPARK-52481] Add `Spark History Server` example 24f66ec is described below commit 24f66eca2e056247a5c76bc77d217df06c177f7c Author: Dongjoon Hyun <dongj...@apache.org> AuthorDate: Sat Jun 14 16:19:26 2025 -0700 [SPARK-52481] Add `Spark History Server` example ### What changes were proposed in this pull request? Add `Spark History Server` example. ### Why are the changes needed? Since Apache Spark 4.0, Spark rolls the event logs by default and compressed them by default. - apache/spark#43638 - apache/spark#43036 However, we still need more configurations to allow SHS manages the event log directories. This PR aims to provide an example of `Spark History Server` with the configuration. ### 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 #249 from dongjoon-hyun/SPARK-52481. Authored-by: Dongjoon Hyun <dongj...@apache.org> Signed-off-by: Dongjoon Hyun <dongj...@apache.org> --- examples/localstack.yml | 1 + examples/spark-history-server.yaml | 42 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/examples/localstack.yml b/examples/localstack.yml index 3b64806..d461280 100644 --- a/examples/localstack.yml +++ b/examples/localstack.yml @@ -38,6 +38,7 @@ spec: - /bin/sh - -c - > + awslocal s3 mb s3://spark-events; awslocal s3 mb s3://data; awslocal s3 cp /opt/code/localstack/Makefile s3://data/ --- diff --git a/examples/spark-history-server.yaml b/examples/spark-history-server.yaml new file mode 100644 index 0000000..644a0fe --- /dev/null +++ b/examples/spark-history-server.yaml @@ -0,0 +1,42 @@ +# 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: spark-history-server +spec: + mainClass: "org.apache.spark.deploy.history.HistoryServer" + sparkConf: + spark.jars.packages: "org.apache.hadoop:hadoop-aws:3.4.1" + spark.jars.ivy: "/tmp/.ivy2.5.2" + spark.driver.memory: "2g" + spark.kubernetes.authenticate.driver.serviceAccountName: "spark" + spark.kubernetes.container.image: "apache/spark:4.0.0-java21-scala" + spark.history.fs.logDirectory: "s3a://spark-events" + spark.history.fs.cleaner.enabled: "true" + spark.history.fs.cleaner.maxAge: "30d" + spark.history.fs.cleaner.maxNum: "100" + spark.history.fs.eventLog.rolling.maxFilesToRetain: "10" + spark.hadoop.fs.defaultFS: "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" + runtimeVersions: + sparkVersion: "4.0.0" + applicationTolerations: + restartConfig: + restartPolicy: Always + maxRestartAttempts: 9223372036854775807 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org