apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.67k stars 4.57k forks source link

Submitting tasks to a K8s environment using Spark plugins yields different results compared to using shell and Spark plugins,even thougth the same command #16505

Open qwe3144 opened 3 weeks ago

qwe3144 commented 3 weeks ago

Search before asking

What happened

shell command as same spark like: $SPARK_HOME/bin/spark-submit \ --name cluster-model-app \ --verbose \ --master k8s://https://192.168.10.40:6443 \ --deploy-mode cluster \ --conf spark.network.timeout=300 \ --conf spark.executor.instances=2 \ --conf spark.kubernetes.namespace=dev \ --conf spark.kubernetes.container.image.pullPolicy=IfNotPresent \ --conf spark.kubernetes.container.image=hzent/spark:hadoop3.2 \ --conf spark.kubernetes.container.image.pullSecrets=dev-image-secret \ --conf spark.kubernetes.authenticate.driver.serviceAccountName=scheduler \ --conf spark.kubernetes.authenticate.executor.serviceAccountName=scheduler \ --conf "spark.hadoop.fs.s3a.access.key=xxxX" \ --conf spark.kubernetes.executor.deleteOnTermination=true \ --conf "spark.hadoop.fs.s3a.secret.key=xxxx" \ --conf "spark.hadoop.fs.s3a.endpoint=http://minio.xxxx:9000" \ --conf "spark.hadoop.fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem" \ --conf "spark.hadoop.fs.s3a.aws.credentials.provider=org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider" \ --conf "spark.hadoop.fs.s3a.path.style.access=true" \ --conf "spark.executor.extraClassPath=/opt/spark/jars/aws-java-sdk-bundle-1.11.375.jar:/opt/spark/jars/hadoop-aws-3.2.0.jar" \ --conf "spark.driver.extraClassPath=/opt/spark/jars/aws-java-sdk-bundle-1.11.375.jar:/opt/spark/jars/hadoop-aws-3.2.0.jar" \ --class com.amberdata.task.Test \ s3a://dolphxxxxxxxxxxxxxxxx/test.jar

the shell command runs successful,but spark plugin failed[shell脚本运行成功,但是spark插件运行失败], the failed reason is that you need to specify spark.kubernetes.file.upload.path for the jars,but the jars will be upload to one of the Dolphinscheduler‘s worker node,not to a pod ,that is too stupid,I suppose it will upload to the executor pod,when the task run over,this pod should be destoryed,and the same as the jar,but it does not,why?

What you expected to happen

I do not know

How to reproduce

no

Anything else

no

Version

3.2.x

Are you willing to submit PR?

Code of Conduct

github-actions[bot] commented 3 weeks ago

Search before asking

What happened

shell command as same spark like: $SPARK_HOME/bin/spark-submit \ --name cluster-model-app \ --verbose \ --master k8s://https://192.168.10.40:6443 \ --deploy-mode cluster \ --conf spark.network.timeout=300 \ --conf spark.executor.instances=2 \ --conf spark.kubernetes.namespace=dev \ --conf spark.kubernetes.container.image.pullPolicy=IfNotPresent \ --conf spark.kubernetes.container.image=hzent/spark:hadoop3.2 \ --conf spark.kubernetes.container.image.pullSecrets=dev-image-secret \ --conf spark.kubernetes.authenticate.driver.serviceAccountName=scheduler \ --conf spark.kubernetes.authenticate.executor.serviceAccountName=scheduler \ --conf "spark.hadoop.fs.s3a.access.key=xxxX" \ --conf spark.kubernetes.executor.deleteOnTermination=true \ --conf "spark.hadoop.fs.s3a.secret.key=xxxx" \ --conf "spark.hadoop.fs.s3a.endpoint=http://minio.xxxx:9000" \ --conf "spark.hadoop.fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem" \ --conf "spark.hadoop.fs.s3a.aws.credentials.provider=org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider" \ --conf "spark.hadoop.fs.s3a.path.style.access=true" \ --conf "spark.executor.extraClassPath=/opt/spark/jars/aws-java-sdk-bundle-1.11.375.jar:/opt/spark/jars/hadoop-aws-3.2.0.jar" \ --conf "spark.driver.extraClassPath=/opt/spark/jars/aws-java-sdk-bundle-1.11.375.jar:/opt/spark/jars/hadoop-aws-3.2.0.jar" \ --class com.amberdata.task.Test \ s3a://dolphxxxxxxxxxxxxxxxx/test.jar

the shell command runs successful,but spark plugin failed[shell脚本运行成功,但是spark插件运行失败], the failed reason is that you need to specify spark.kubernetes.file.upload.path for the jars,but the jars will be upload to one of the Dolphinscheduler‘s worker node,not to a pod ,that is too stupid,I suppose it will upload to the executor pod,when the task run over,this pod should be destoryed,and the same as the jar,but it does not,why?

What you expected to happen

I do not know

How to reproduce

no

Anything else

no

Version

3.2.x

Are you willing to submit PR?

Code of Conduct

SbloodyS commented 3 weeks ago

Spark on k8s not supported right now. Would you like to improve it? @qwe3144