spark-operator
spark-operator copied to clipboard
Windows support for sparkctl submission with local spec.mainApplicationFile and spec.deps
Unable to do "sparkctl create" in Windows with spec.mainApplicationFile and/or spec.deps referencing local files. Sample below
spec:
mainApplicationFile: "C://mypath\\myfile.py"
...
deps:
pyFiles:
- "C://mypath\\mydep.py"
...
Output from "sparkctl create" command shows that the upload piece doesn't run
sparkctl create C:\\mypath\spark-py-pi-windows.yaml -n spark-namespace -d --upload-to-endpoint https://ecs-endpoint.com --upload-to s3://spark-operator --s3-force-path-style --override
SparkApplication "pyspark-pi-new" created
Complete YAML pasted below. Please let me know if more information is required.
Note: I did try with single/double backslash in the Windows path. Also single forward slash.
apiVersion: "sparkoperator.k8s.io/v1beta2"
kind: SparkApplication
metadata:
name: pyspark-pi-new
namespace: spark-namespace
spec:
type: Python
pythonVersion: "3"
mode: cluster
imagePullPolicy: Always
mainApplicationFile: "C://Local\\Spark\\New/pi.py"
sparkVersion: "3.4.1"
deps:
pyFiles:
- "C://Local\\Spark\\New\\test_dependency.py"
restartPolicy:
type: OnFailure
onFailureRetries: 3
onFailureRetryInterval: 10
onSubmissionFailureRetries: 5
onSubmissionFailureRetryInterval: 20
driver:
cores: 1
coreLimit: "1200m"
memory: "512m"
labels:
version: 3.4.1
serviceAccount: spark
executor:
cores: 1
instances: 1
memory: "512m"
labels:
version: 3.4.1