Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIVY-870] Adding changes to provide Spark config using --properties-file #331

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

akshatb1
Copy link

What changes were proposed in this pull request?

Currently for batch jobs, individual Spark configs are added as --conf parameter in Spark submit command line. If there are many Spark configurations added in Livy APIs, it might increase the length of command line and in some cases might cause issues due to limit on command line length (Windows has 8191 character length limit on the command line length.).

In this PR, modifying the behavior to merge all the configurations into a temporary properties file and adding that as --properties-file opt in spark-submit command

JIRA: https://issues.apache.org/jira/browse/LIVY-870

How was this patch tested?

Verified Spark job submission in a local Yarn cluster. Checked in the logs that all configurations are merged to a properties file which is added as an opt in spark-submit command. Please see the logs below.

21/10/12 12:01:15 INFO SparkProcessBuilder: Merged Spark config and generated file: D:\Data\Livy0.8\sparkConfig7641984478423208311.properties
21/10/12 12:01:15 INFO SparkProcessBuilder: Running 'D:/Spark/\bin\spark-submit.cmd' '--name' 'SparkBatchJobTest-14' '--class' 'WordCountJob' '--properties-file' 'D:\Data\Livy0.8\sparkConfig7641984478423208311.properties' 'file:///D:/Spark/examples/jars/default_artifact.jar' 'D:/Test.txt'

@akshatb1 akshatb1 changed the title Adding changes to provide Spark config using --properties-file [LIVY-870] Adding changes to provide Spark config using --properties-file Oct 12, 2021
@leesf
Copy link
Contributor

leesf commented Dec 5, 2022

@akshatb1 would you please rebase to latest master to fix the CI failure?

@akshatb1 akshatb1 force-pushed the spark-submit-properties branch from e5b8f0c to 7df3b4e Compare December 5, 2022 09:05
@akshatb1
Copy link
Author

akshatb1 commented Dec 5, 2022

@akshatb1 would you please rebase to latest master to fix the CI failure?

Thanks @leesf. I have rebased the branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants