Skip to content

Instantly share code, notes, and snippets.

@calixtofelipe
Created February 12, 2021 15:21
Show Gist options
  • Save calixtofelipe/49bd6604b1ebdadf594a8685da64028c to your computer and use it in GitHub Desktop.
Save calixtofelipe/49bd6604b1ebdadf594a8685da64028c to your computer and use it in GitHub Desktop.
# Licensed 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
#
# https://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.
#
# Support for Python is experimental, and requires building SNAPSHOT image of Apache Spark,
# with `imagePullPolicy` set to Always
apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
name: sparkjob
namespace: default
spec:
type: Python
pythonVersion: "3"
mode: cluster
image: "localregistry:5000/sparkjob:v2"
imagePullPolicy: Always
mainApplicationFile: local:///mongo_spark_s3.py
sparkVersion: "3.0.1"
restartPolicy:
type: OnFailure
onFailureRetries: 3
onFailureRetryInterval: 10
onSubmissionFailureRetries: 5
onSubmissionFailureRetryInterval: 20
driver:
cores: 1
coreLimit: "1000m"
memory: "512m"
labels:
version: 3.0.0
#serviceAccount: sparkoperator
executor:
cores: 2
instances: 3
memory: "1024m"
labels:
version: 3.0.0
deps:
jars:
- https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/3.2.0/hadoop-aws-3.2.0.jar
- https://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-bundle/1.11.375/aws-java-sdk-bundle-1.11.375.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment