Skip to content

Commit 6d02b65

Browse files
committed
[SPARK-53933] Add Apache Iceberg example
1 parent 5543de8 commit 6d02b65

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

examples/localstack.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ spec:
4141
awslocal s3 mb s3://spark-events;
4242
awslocal s3 mb s3://ingest;
4343
awslocal s3 mb s3://data;
44+
awslocal s3 mb s3://warehouse;
4445
awslocal s3 cp /opt/code/localstack/Makefile s3://data/
4546
---
4647
apiVersion: v1
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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: spark-connect-server-iceberg
19+
spec:
20+
mainClass: "org.apache.spark.sql.connect.service.SparkConnectServer"
21+
sparkConf:
22+
spark.dynamicAllocation.enabled: "true"
23+
spark.dynamicAllocation.maxExecutors: "3"
24+
spark.dynamicAllocation.minExecutors: "3"
25+
spark.dynamicAllocation.shuffleTracking.enabled: "true"
26+
spark.hadoop.fs.s3a.access.key: "test"
27+
spark.hadoop.fs.s3a.endpoint: "http://localstack:4566"
28+
spark.hadoop.fs.s3a.path.style.access: "true"
29+
spark.hadoop.fs.s3a.secret.key: "test"
30+
spark.jars.ivy: "/tmp/.ivy2.5.2"
31+
spark.jars.packages: "org.apache.hadoop:hadoop-aws:3.4.1,org.apache.iceberg:iceberg-spark-runtime-4.0_2.13:1.10.0"
32+
spark.kubernetes.authenticate.driver.serviceAccountName: "spark"
33+
spark.kubernetes.container.image: "apache/spark:4.0.1"
34+
spark.kubernetes.driver.pod.excludedFeatureSteps: "org.apache.spark.deploy.k8s.features.KerberosConfDriverFeatureStep"
35+
spark.kubernetes.executor.podNamePrefix: "spark-connect-server-iceberg"
36+
spark.scheduler.mode: "FAIR"
37+
spark.sql.catalog.s3.type: "hadoop"
38+
spark.sql.catalog.s3.warehouse: "s3a://warehouse"
39+
spark.sql.catalog.s3: "org.apache.iceberg.spark.SparkCatalog"
40+
spark.sql.defaultCatalog: "s3"
41+
spark.sql.extensions: "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions"
42+
applicationTolerations:
43+
resourceRetainPolicy: OnFailure
44+
runtimeVersions:
45+
sparkVersion: "4.0.1"

0 commit comments

Comments
 (0)